Part of #378. It depends on B: without B, tier-2 only emits the same slow runtime calls from machine code.
Today tier-2 is about 8% slower than the interpreter on the Rails bench. This matches ADR 0037's finding: removing the op loop is worth about zero, and the cost is in dispatch, frames and value work.
YJIT is only about 1.8× faster than CRuby interp on this bench (130 vs 240 µs/req). So B alone may beat CRuby interp, while beating YJIT needs:
- shape-based ivar access;
- method and block inlining at monomorphic call sites;
- class guards with deopt back to the interpreter;
- native iterator loops (
each, map, times) compiled inline with their block.
An ADR is needed before implementation (it extends ADR 0034/0037).
Part of #378. It depends on B: without B, tier-2 only emits the same slow runtime calls from machine code.
Today tier-2 is about 8% slower than the interpreter on the Rails bench. This matches ADR 0037's finding: removing the op loop is worth about zero, and the cost is in dispatch, frames and value work.
YJIT is only about 1.8× faster than CRuby interp on this bench (130 vs 240 µs/req). So B alone may beat CRuby interp, while beating YJIT needs:
each,map,times) compiled inline with their block.An ADR is needed before implementation (it extends ADR 0034/0037).