logoalt Hacker News

titzeryesterday at 2:16 PM8 repliesview on HN

The section on dynamic compilers is more or less all about trace compilation. Generally, trace compilation is a dead end and has been abandoned repeatedly. The more important concepts here are type feedback and speculation and deoptimization, as well as making fast compilers and tiering.

The course overall looks good, and it's great that so much is available online, so well done, Adrian.


Replies

sampsyesterday at 2:29 PM

Thanks, Ben. I admit I mostly think tracing is just a mind-expanding concept to learn about, even if history has proven it’s not very practical as an organizing principle. But as you say, I’d love to offer more context on “what actually seems to work” industrially.

show 1 reply
mlazosyesterday at 7:44 PM

I work on PyTorch torch.compile and it’s a tracing compiler as well. Perhaps this domain is very narrow though; it is also a very not conventional compiler, you’d probably be deeply offended by some of the stuff we do! ;)

jlebaryesterday at 3:49 PM

> Generally, trace compilation is a dead end and has been abandoned repeatedly.

JAX is a tracing compiler!

(I know, I know, it sits in an extremely different part of the problem space than TraceMonkey or LuaJIT. Still.)

show 2 replies
jcranmeryesterday at 3:13 PM

The TraceMonkey paper was on my qual reading list, and my quals happened to be around the time TraceMonkey was ripped out of SpiderMonkey. I was talking with one of the developers at the time (I think it was Jason Orendorff?), who said that tracing just doesn't work out, but there was limited circumstances where he thought it might work out... but I've completely forgotten what those circumstances were.

mikemikeyesterday at 8:24 PM

Trace compilation is NOT a dead end.

LuaJIT works just fine. On big programs. On hundreds of millions of servers and devices.

I find it deeply saddening that even scholars keep repeating this trope. Ignorance is bliss.

show 1 reply
abecedariusyesterday at 3:44 PM

Has LuaJIT been superseded?

giancarlostoroyesterday at 2:25 PM

Got any other recommended resources on building compilers?

yu3zhou4yesterday at 5:46 PM

PyTorch?