2026-11-16: Menai v0.10

Published: 2026-11-16

Menai v0.10 is out. It continues the trend of making things faster, and of making it easier to see where the time is going. Overall it's in the range of 0%-30% faster than v0.9, with a median of about 10% on the benchmark suite.

Menai v0.10

Menai v0.10 continues the general trend of making things faster, and making it easier to see where time is being spent. Overall this is in the range of 0%-30% faster than v0.9, with a median of about 10% on the benchmark suite.

New features

  • Added a --width N option to menai-eval, menai-test, menai-benchmark, menai-pipeline, and menai-disassemble. Output is no longer clipped by default. When a width is given, lines longer than that width are clipped. This keeps long function names and constants visible unless the caller asks for a fixed width.
  • Added bytecode instruction coverage. menai-eval --coverage reports how much of a program's compiled bytecode executed. menai-test --coverage and menai-benchmark --coverage merge coverage across all selected test files or benchmark suites and cases, counting each function once by source identity, so the report shows how much of the library was exercised across all scenarios. Unexercised functions are reported with 0% coverage.
  • #none, the booleans, fixnum integers and most floats are now immediate values held in the MenaiValue word rather than pool objects. They are never allocated or reference counted, and the small-integer cache is gone. Mean performance gain of about 6%.
  • Added a new branch fact CFG optimization to eliminate more dead code.
  • Added a CFG pass that folds an enum switch whose scrutinee is a statically-known variant into a jump to the selected arm. This deletes a mode dispatch that inlining has made static, and the arms it makes unreachable are never emitted.
  • A type guard shared by several blocks is now placed once, in the block that dominates every use, rather than repeated in each; the copy in a loop's continue block no longer executes once per iteration.
  • An apply's result now carries the return type of the functions it may call, so a field read on an applied function's result can resolve to a constant index.
  • Improved inlining of functions (gain of just over 0.3%).
  • A type guard now names the type it required, e.g. type mismatch: expects a bytes value, rather than a bare type mismatch.

Bug fixes

  • Fixed a Unicode parsing error in the JSON decoder library.
  • Resolved a problem with opcode type signatures being incorrect.
  • Fixed a memory-safety bug in the VM: enum values and enum type descriptors were not marked by the garbage collector, so an enum's type descriptor, and an enum type's name and variant names, could be freed while still reachable.
  • Fixed two LICM hoisting faults: a type guard could be hoisted above the check its operand depended on, and an instruction could be hoisted above the definition of an operand that is only computed inside the loop.