Skip to content

Tracking: a JIT that beats YJIT on Rails-shaped code (C) #385

Description

@linyiru

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).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    researchNeeds analysis before implementation scoping

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions