Sigil 0.11.0

release

Register VM and self-hosting CPS compiler. This release adds a register-based virtual machine as an alternative backend for the CPS compiler introduced in 0.10.0. The new toolchain is opt-in via SIGIL_NEXT=1 and is 7-57% faster than the direct compiler across all benchmark categories. It is fully self-hosting — the CPS compiler running on the register VM can compile itself.

Download 0.11.0Get started

Register VM

Enable with SIGIL_NEXT=1. This activates both the CPS compiler and the register VM together. All stdlib modules compile, all ecosystem tests pass (zero regvm-specific failures across ~2,700 tests in 23 repos).

The register VM uses 32-bit fixed-width instructions with 3-address register operands. Key design features:

New source files:

Performance

Benchmarks across 60+ tests (ratio = register VM time / direct compiler time, lower is faster):

CategoryRatioImprovement
Compute (fib, tak, ack)0.79-0.93x7-21% faster
Closures0.56-1.03xUp to 44% faster
Tail calls0.76-0.96xUp to 24% faster
String processing0.43-0.90xUp to 57% faster
Allocation/trees0.80-1.01xUp to 20% faster
Higher-order functions0.72-1.03xUp to 28% faster
JSON encode/decode~1.0xParity (stdlib-bound)

The register VM went from 3.3x slower (initial prototype) to consistently faster than the direct compiler through register allocation, coalescing, and call window optimizations.

Self-Hosting Bootstrap

The CPS compiler + register VM can compile itself. A two-stage bootstrap (stack VM binary compiles regvm binary, regvm binary recompiles itself) produces byte-identical output for 43/44 stdlib modules. This proves the new toolchain is correct enough to replace the direct compiler.

CPS Compiler Improvements

Fixes and enhancements to the CPS compiler from 0.10.0:

Other Changes