• everyonesconnected@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    11
    ·
    24 hours ago

    So from what I can read, the Morrowind Script Extender uses LuaJIT instead of regular lua, which does tracing just-in-time compilation. Meaning, and I’m just paraphrasing wikipeda here, it compiles frequently executed sequeneces of operations into machine code.

    • sp3ctr4l@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      4
      ·
      edit-2
      22 hours ago

      Now, that is a very relevant detail!

      I did not know LuaJIT was even a thing.

      Still probably not as performant as … C++ or Rust or something, that is totally precompiled… but that would explain how this is even possible, a 3D Lua based physics engine.

      Yeah, looks like LuaJIT passes a bunch of the Lua code into C, just good ole C, and then dynamically compiles it, then runs the ‘translated’ C code.

      That makes a lot more sense lol.