• [object Object]@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      19 hours ago

      It is, yes. But I also commented on Lua vs Python, and if you even try to time them, Lua scripts will be finished before Python starts up. Lua is so fast that people mostly don’t bother making libs for it in C, the fucking interpreter is quick enough for folks to skip any kind of compiling and just write libraries in the interpreted language. Oh, didn’t I mention? The startup thing is with the interpreter, without any kind of bytescript, JIT and such.

      In the same vein, the K and Q languages and the KDB+ database by Arthur Whitney are so goddamn fast at array processing that they’re used in banking for decades despite their extremely inscrutable syntax that would shear any Python programmer’s head clean off. They just stay in the cache at most times. And they are also interpreted, not compiled at any time.

      Python suffers from the same shit as Java, it has to initialize hundreds of objects before the main program even starts, and then it creates hundreds more. Neither Lua nor JavaScript do that. PHP does to some extent, but the fucker is so fast that it can recreate the entire runtime context on every single request and then drop all of it afterwards, and it’s still quicker than Python.

      • thingsiplay@lemmy.ml
        link
        fedilink
        arrow-up
        2
        ·
        20 hours ago

        The use case for Lua is very different from Python. It’s not directly comparable, as Lua is barebones.

        • [object Object]@lemmy.world
          link
          fedilink
          arrow-up
          1
          ·
          19 hours ago

          Lua is directly comparable to Python, as it’s incredible at quasi-interactive scripting. Python actually fits better when startup time doesn’t matter, while a Lua script can start and finish a dozen times before a Python process just turns on.