levi
Still fresh, damnit!
I don't know if any of us here are familiar with the performance of Lua code to be honest. I assume it's the read in the anonymous function assigned to Updatewheel at least.
It's called bytecode. Duh.For its execution many more strings than user data cannot be involved or Lua wouldn't be as fast as it is. Playing with strings is costly.
So?It's called bytecode. Duh.
The language definition of Lua may sound like it's a scripting language, but its reference implementation is not - it wants you to believe that it is one. In reality it is closer related to Java, because it only executes bytecode, not scripts. The "interpreter" compiles everything into bytecode to be run onto an universal virtual machine instead of executing the Lua script directly. Most other scripting environments that allow bytecode (like Python) only offer it as an optional feature for more speed, but Lua only executes bytecode, just like Java.
The sadist in me is tempted to mention Rembulan. Oh wait, too late... Can you hear those sweet Lua screams from that juicy JVM over there~?Dont you dare compare it with such trash.
Makes me wonder if it actually implements caching for these sort of things. Testing it would be fairly easy: compile the script into pre-compiled bytecode and execute that instead and compare the results.But I'm not wrong, am I. If the Lua binary gets started and the script loaded every iteration, that'd cost significantly more time than when keeping it up.