alt.hn

6/29/2026 at 3:02:00 PM

WATaBoy: JIT-Ing Game Boy Instructions to WASM Beats a Native Interpreter

https://humphri.es/blog/WATaBoy/

by energeticbark

6/29/2026 at 6:44:40 PM

I've always really enjoyed Andrew Kelley's article about trying to statically recompile NES code from 2013 [1]. Basically he makes a ton of progress but gets hung up not just on the realities of the handwritten assembler of the era just not being all that great at mapping to higher level LLVM IR. In the conclusion he specifically calls out a JIT-type methodology as probably being the way to go, where you live-recompile the hot paths when you have the runtime data required to actually understand them, and don't worry about the parts you can't.

Very cool to see something like that in action.

[1]: https://andrewkelley.me/post/jamulator.html

by mikepurvis

6/29/2026 at 5:14:21 PM

Of course it beats a native interpreter. WASM overhead is about 20%, interpreter overhead is about 1000%.

What's cool here is to have a GameBoy JIT runtime at all.

by ahartmetz

6/29/2026 at 5:44:07 PM

It's two jits in total.

by grashalm

6/29/2026 at 4:16:32 PM

This is an incredible project for an undergraduate. Very impressive. Interesting to note that Firefox is 25% slower than Chrome/Safari, I wonder why.

by dag100

6/29/2026 at 4:21:22 PM

[flagged]

by tmpz22

6/29/2026 at 4:54:44 PM

I'd hire an undergraduate who can produce this level of work with Claude.

by simonw

6/29/2026 at 4:34:10 PM

What are you basing this statement on? The code comments read very human to me. Your the one hurting their chances of finding a job by falsely saying this.

by koolala

6/29/2026 at 4:29:01 PM

Every company they apply to will be leveraging LLMs. Time to get over it. No need to be grumpy old man about such things. Every generation has faced such foes. The old always yields to the new.

For the times they are a-changin'

by godwinson__4-8

6/29/2026 at 4:09:15 PM

Very interesting article. Would've been fun to see the comparison between native interpreter & JIT-on-WASM on iOS as well

by milch

6/29/2026 at 5:50:59 PM

So it's a JIT-in-JIT? JiJIT?

by jonny_eh

6/29/2026 at 3:47:57 PM

[dead]

by bebenebenebeb

6/29/2026 at 4:14:55 PM

yet on real old hardware it would be 20x slower in real life. same as all native javascript junk - its fast, but non usuable on older hardware

by iberator

6/29/2026 at 5:57:35 PM

Here's a nickel kid. Go buy yourself a real computer.

by qweqwe14

6/29/2026 at 4:49:40 PM

Good thing I'm not running games on my 4gb Pentium 4 then.

by switchbak