1 comment

[ 1.9 ms ] story [ 11.0 ms ] thread
(The title comes from https://luajit.org/faq.html which links to this as such. It's how I discovered it.)

I've been toying with the idea of adding a tracing JIT to arc (https://news.ycombinator.com/item?id=38586832). I started off by trying to eliminate the call overhead compared to plain racket. I realized that I could generate optimal racket code for each loop by tracing hot spots at runtime.

I'm not quite sure how to go from "generating Racket code" to "generating actual native code", especially because I'd need to figure out how to interface with it via racket's FFI. It's an interesting question how fast a JIT for Racket could run. But for now, I'm more interested in the underlying techniques in LuaJIT.

Some past discussion of LuaJIT: https://news.ycombinator.com/item?id=4775071 (from "LuaJit 2.0 is out" on Nov 12, 2012, 72 comments)

Informative thread about LuaJIT's side traces ("LuaJIT does not treat traces as trees"): http://lambda-the-ultimate.org/node/3851#comment-57679 h.t. rayiner https://news.ycombinator.com/item?id=4775404

Also, interestingly, TIL that Mike Pall is a pen name. http://lua-users.org/lists/lua-l/2009-11/msg00106.html

> "Without invading your privacy, could you please, add a human face to the code and dispel the misconceptions?"

> I know enough about the Internet not to do this. But you'd be surprised for sure.

I had no idea that LuaJIT was made by someone with Satoshi's propensities. Cool.