Skip to content

πŸš€ v0.3.0 β€” Bytecode VM

Latest

Choose a tag to compare

@timfennis timfennis released this 21 Mar 20:29
· 25 commits to master since this release
e9a5365

The interpreter has been rewritten from a tree-walk evaluator to a bytecode-compiled stack-based VM, delivering 2–4x speedups across the board.

What's new

  • Bytecode compiler and stack-based VM replace the tree-walk interpreter
  • disassemble CLI subcommand to inspect generated bytecode
  • The ackermann benchmark no longer overflows the stack

Performance

Benchmark v0.2.1 v0.3.0 Speedup
fibonacci 318.0 ms 80.1 ms 4.0x
sieve 439.4 ms 125.2 ms 3.5x
closures 248.5 ms 78.6 ms 3.2x
perlin 216.5 ms 67.5 ms 3.2x
pi_approx 103.8 ms 32.3 ms 3.2x
quicksort 192.0 ms 75.2 ms 2.6x
map_ops 74.7 ms 28.7 ms 2.6x
hof_pipeline 84.8 ms 36.7 ms 2.3x
matrix_mul 133.1 ms 67.0 ms 2.0x