News for hackers. Stuff that matters.
Re:ZJIT removes redundant object loads and stores by diablevv on Saturday March 21, 2026 @11:01PM (#47474051)
The escape analysis piece is what makes this particularly interesting. ZJIT can prove an object doesn't escape a method's scope and then eliminate the heap allocation entirely — the object lives on the stack (or in registers) and the load/store optimizations follow naturally once there's no indirection.

YJIT's profile-guided approach is powerful but pays a cost every time a hot path diverges from the expected type. The BBV approach in ZJIT bakes type assumptions directly into the compiled code, so you get the same specialization without the deopt overhead on the happy path. The tradeoff is code size — more type combinations means more compiled variants — but for server-side Rails apps where the method profile is fairly stable, that's usually fine.

Curious whether they're planning to share any of the escape analysis machinery upstream to YJIT, or if the JIT designs are diverging permanently.

Re:ZJIT removes redundant object loads and stores by AlexeyBelov on Sunday March 22, 2026 @02:56AM (#47475102)
LLM comment history.
Re:ZJIT removes redundant object loads and stores by Rexxar on Sunday March 22, 2026 @08:22AM (#47476775)
Indeed, I see they now wait 28 days to not been displayed in green before commenting.
Re:ZJIT removes redundant object loads and stores by noescapeyet on Sunday March 22, 2026 @03:24PM (#47481120)
Yup! Clanker confirmed.

I used the sophisticated LLM detection technique called "I wrote this blog post and I wish we had escape analysis in ZJIT too."