mhtirogla
Home
Systems
API
Pricing
About
Log in
← Back
Home
›
Systems
›
Operating systems and runtimes
bytecode-interpreter
bytecode interpreter
CPython, Lua
System
Techniques · 5
Primitives · 24
bytecode-interpreter
Incremental and concurrent garbage…
compilers · medium: Trace the heap in small steps or on other threads while the program runs, and use barriers to keep the collector's view correct.
›
Inline caches
compilers · medium: Per-call-site cache of "this object shape, that slot or target", turning dynamic property and method lookup into a compare and a load.
›
Thread caching allocator
systems · medium: General-purpose malloc with size classes, per-thread caches and free-list sharding (tcmalloc, mimalloc)
Stack unwinding
compilers · medium: Frame-pointer, DWARF CFI and compact unwinding of call stacks
Debug info (DWARF)
compilers · medium: DWARF stores a tree of typed entries (DIEs), a line-number bytecode, unwind tables and location expressions that map machine state back to source; pick it for ELF/Mach-O debug builds.
›
Mark-sweep garbage collection
compilers · low: Find everything reachable from the roots, free the rest in place; handles cycles, never moves objects, and is the base of most production collectors.
›
Slab allocator
systems · low: Pre-carve pages into equal-size slots per size class with an in-place free list: O(1) alloc and free, no external fragmentation, cache-warm reuse.
›
Calling conventions abi
compilers · low: System V, Windows x64 and AAPCS64 ABIs: argument registers, stack frames, struct passing, FFI
Bytecode compilation
compilers · low: Flatten an AST into compact linear instructions with a constant pool, backpatched jumps and slot-numbered locals, so a small loop can execute it.
›
Bytecode interpreter
compilers · low: Register/stack VM dispatch loop for executing compiled plans or rules (SQLite VDBE, nftables)
Closures and upvalues
compilers · low: How interpreters and compilers let a function keep using its enclosing variables after they return: flat closures, open and closed upvalues, closure conversion, capture by value or reference.
›
Pratt parsing
compilers · low: Table-driven expression parsing with one loop and a numeric binding power per operator; the compact core of precedence handling in hand-written parsers.
›
Recursive-descent parsing
compilers · low: Hand-written top-down parser with one function per grammar rule; simple, fast, with full control over error messages and recovery.
›
Reference counting
compilers · low: Keep a count of owners in each object, free it when the count hits zero; deterministic and local, but pays on every copy and leaks cycles.
›
Value tagging and NaN-boxing
compilers · low: Pack the type and the payload of any value into one 64-bit word, using spare low bits of aligned pointers or the unused payload of NaNs, so type tests are one mask compare.
›
Fibers stackful coroutines
concurrency · low: User-mode context switch: stack allocation, register save, M:N scheduling of green threads
String interning
data-structures · low: Store each distinct string once and refer to it by id
Swiss table
data-structures · low: Open-addressing hash table that filters 8-16 slots at once with 1-byte hash tags and SIMD, giving fast lookups at 87.5 % load.
›
Big integer arithmetic
numerics · low: Multi-limb integer arithmetic (256-bit and up): carries, Karatsuba, Montgomery and Barrett reduction
Memory ordering
concurrency · low: What Relaxed, Acquire, Release and SeqCst atomics actually guarantee, what they cost on x86 and ARM, and which one each pattern needs.
›
Hidden classes (shapes)
compilers · low: Objects that gained the same properties in the same order share one layout descriptor, so a property is an index and the layout is one comparable id.
›
+ 8 more primitives
System
Techniques · 5
Primitives · 24
bytecode-interpreter
Incremental and concurrent garbage…
compilers · medium: Trace the heap in small steps or on other threads while the program runs, and use barriers to keep the collector's view correct.
›
Inline caches
compilers · medium: Per-call-site cache of "this object shape, that slot or target", turning dynamic property and method lookup into a compare and a load.
›
Thread caching allocator
systems · medium: General-purpose malloc with size classes, per-thread caches and free-list sharding (tcmalloc, mimalloc)
Stack unwinding
compilers · medium: Frame-pointer, DWARF CFI and compact unwinding of call stacks
Debug info (DWARF)
compilers · medium: DWARF stores a tree of typed entries (DIEs), a line-number bytecode, unwind tables and location expressions that map machine state back to source; pick it for ELF/Mach-O debug builds.
›
Mark-sweep garbage collection
compilers · low: Find everything reachable from the roots, free the rest in place; handles cycles, never moves objects, and is the base of most production collectors.
›
Slab allocator
systems · low: Pre-carve pages into equal-size slots per size class with an in-place free list: O(1) alloc and free, no external fragmentation, cache-warm reuse.
›
Calling conventions abi
compilers · low: System V, Windows x64 and AAPCS64 ABIs: argument registers, stack frames, struct passing, FFI
Bytecode compilation
compilers · low: Flatten an AST into compact linear instructions with a constant pool, backpatched jumps and slot-numbered locals, so a small loop can execute it.
›
Bytecode interpreter
compilers · low: Register/stack VM dispatch loop for executing compiled plans or rules (SQLite VDBE, nftables)
Closures and upvalues
compilers · low: How interpreters and compilers let a function keep using its enclosing variables after they return: flat closures, open and closed upvalues, closure conversion, capture by value or reference.
›
Pratt parsing
compilers · low: Table-driven expression parsing with one loop and a numeric binding power per operator; the compact core of precedence handling in hand-written parsers.
›
Recursive-descent parsing
compilers · low: Hand-written top-down parser with one function per grammar rule; simple, fast, with full control over error messages and recovery.
›
Reference counting
compilers · low: Keep a count of owners in each object, free it when the count hits zero; deterministic and local, but pays on every copy and leaks cycles.
›
Value tagging and NaN-boxing
compilers · low: Pack the type and the payload of any value into one 64-bit word, using spare low bits of aligned pointers or the unused payload of NaNs, so type tests are one mask compare.
›
Fibers stackful coroutines
concurrency · low: User-mode context switch: stack allocation, register save, M:N scheduling of green threads
String interning
data-structures · low: Store each distinct string once and refer to it by id
Swiss table
data-structures · low: Open-addressing hash table that filters 8-16 slots at once with 1-byte hash tags and SIMD, giving fast lookups at 87.5 % load.
›
Big integer arithmetic
numerics · low: Multi-limb integer arithmetic (256-bit and up): carries, Karatsuba, Montgomery and Barrett reduction
Memory ordering
concurrency · low: What Relaxed, Acquire, Release and SeqCst atomics actually guarantee, what they cost on x86 and ARM, and which one each pattern needs.
›
Hidden classes (shapes)
compilers · low: Objects that gained the same properties in the same order share one layout descriptor, so a property is an index and the layout is one comparable id.
›
Machine code emission
compilers · low: Encode instructions to bytes for x86-64 and AArch64, branch relaxation, constant pools
Numa aware allocation
hardware-os · low: Allocate memory and pin threads on the local NUMA node; first-touch and interleave policies
Executable formats elf pe
compilers · low: ELF, PE and Mach-O: sections, segments, symbol tables, relocations, dynamic loading
Varint (LEB128)
compression · low: Variable-length integers in 7-bit groups with a continuation bit; small numbers take 1 byte, the wire format of Protobuf, WebAssembly and DWARF.
›
Name resolution
compilers · low: Bind every use of a name to its declaration with a scope stack, handling shadowing, hoisting and closure capture in one AST walk.
›
Peephole optimization
compilers · low: Local pattern rewrites on short instruction windows or IR
BFS and DFS
graphs · low: The two basic graph traversals; BFS gives hop distances and levels, DFS gives discovery/finish order for cycles, components and topological order.
›
Sparse matrices (CSR)
numerics · low: Compressed sparse row stores only nonzeros as row pointers, column indices and values; SpMV streams them once, so it is memory-bandwidth bound.
›
Copy for AI
Similar systems
Share the most building blocks with this one.
jit-vm
17 %