Skip to main content

narrow_vm_enabled

Function narrow_vm_enabled 

Source
pub fn narrow_vm_enabled() -> bool
Expand description

Narrow a new Seq of Int whose elements provably fit i32 into half-width (Vec<i32>) VM storage — the interpreter analogue of the AOT Vec<i64>Vec<i32> narrowing, halving the array footprint and cache pressure. The JIT region path is i32-array aware (the hot region still tiers — 0 bails). PROMOTED 2026-06-21: default ON (kill-switch LOGOS_NARROW_VM=0) — graph_bfs -27.6% and array_fill -16.7% on the faithful interleaved A/B, all 33 benchmarks bit-identical, full suite 10341/10341 green, no regression.

Read fresh on each body-compile (not memoized) so a process can compile both regimes — the A/B differential harness and the in-process tests rely on this. The cost is one env lookup per function body, never per op.