Retrofitting JIT Compilers into C Interpreters

52 points by ltratt


injuly

Great read! This is very clever.

Since video games have very tight performance constraints, many game engines are stuck with Lua 5.1 (the one that LuaJIT supports).

Something like this can be super useful for game engines and applications wanting higher performance out of embedded scripting languages.

fanf

I know of a couple of other reverse register allocators:

mhanberg

It took me a minute to realize this meant interpreters written in C, and not interpreters of the C language.

chc4

This is great! I've been following along with yk's development for a few years now, after stumbling across it while working on my own (bad, shelved) meta-JIT library. Meta-JITs are extremely cool and it's really encouraging that yk is able to actually get sizable speedups in practice. Between this and weval it feels like the dream of HP Dynamo and other attempts at "just distill a faster program" are being revived a bit.

tekknolagi

Great post. I'm a little sad to not see Skybison Python runtime mentioned but I suppose it only had a prototype JIT anyway.