from Hacker News

Building a baseline JIT for Lua automatically (2023)

by lawrencechen on 1/11/24, 8:11 AM with 29 comments

  • by tiffanyh on 1/11/24, 3:36 PM

    FYI - Mike Pall is back working on LuaJIT.

    And v3.0 is underway.

    https://github.com/LuaJIT/LuaJIT/issues/1092

  • by ngrilly on 1/11/24, 10:12 AM

    It was a very interesting read, in the context of Python getting a copy-and-patch JIT compiler in the upcoming 3.13 release [1], to understand better the approach.

    [1] https://tonybaloney.github.io/posts/python-gets-a-jit.html

  • by summarity on 1/11/24, 9:04 AM

    The last (interpreter only) version mentioned that neither GC nor modules were implemented. Did that change?

    The JIT work is exciting but even more exciting would be a faster, fully featured interpreter for platforms with runtime code generation constraints (e.g. iOS) for integration into engines like Love

  • by lambdaone on 1/11/24, 12:04 PM

    This is a beautiful piece of work. Connecting all the semantic levels is hard work, and this does it elegantly. It goes to show that old-fashioned technology like object files and linkers is still useful, and can still pay off in unexpected ways as part of new technology.
  • by eachro on 1/11/24, 9:47 AM

    I tried reading this post and it just went way over my head. Anyone have any good resources on background material to even start?
  • by stargrazer on 1/11/24, 10:20 AM

    I am using https://luajit.org/ in my GCC C++ project.

    Can I use this faster Lua JIT in my project as a replacement? And if so, how so?

    The existing luajit doesn't do v5.1, so it would be nice to use this newer engine at the newer baseline lua version level.

  • by chombier on 1/11/24, 11:10 AM

    For those interested, the ACM page for the paper has a good introductory video https://dl.acm.org/doi/abs/10.1145/3485513