Beating the compiler

last updated: Jul 13, 2024

https://www.mattkeeter.com/blog/2024-07-12-interpreter/

In modern times, everyone knows that writing assembly is a fool's errand: compilers are the result of literal engineer-centuries of work, and they know the processor much better than you do.

And yet – one hears rumors.

Written in ancient tomes, muttered in quiet watering holes, scrawled on the walls of bygone temples, hinted at by mysterious texts; the rumors paint a specific picture:

Compilers are bad at generating code for interpreters, and it's possible to outperform them by writing your interpreter in assembly.

I've only quoted the start, because the whole thing is absolutely worth reading if you care about this sort of thing.

I have mostly no idea at all how to read assembly, and I still found it enlightening!

The article also mentions luajit techniques, which I've previously linked in Building the fastest Lua interpreter... automatically and Building a baseline JIT for Lua automatically

↑ up