Since someone mentioned it, how slower is PUC Lua in respect to LuaJIT? Compromisingly slower? Are there metrics out there or is it a relatively subjective feeling?
Though luajit has gotten even more optimisations since that was done.
That said, I rarely find my code's performance is the bottleneck, and don't benefit from luajit. The guys that do are doing scientific computing (e.g. torch) or high performance networking (e.g. snabb)
I've been involved in a project where we used LuaJIT. At some point we discovered that a bug in our build process was making it pick up PUC Lua (from the system-installed packages) rather than LuaJIT (from the build process itself).
This went under the radar for a while even though we had tons of traffic. Turns out PUC Lua is pretty fast on its own.
PUC lua is probably the fastest traditional scripting language. LuaJIT is much faster, in particular if you are interfacing with C, as the ffi has zero overhead, while the traditional Lua API is relatively slow. Also the performance is noticeable if you are doing a lot of work in the language too, generally as fast as C code for many use cases if you tune the code.
> PUC lua is probably the fastest traditional scripting language
That really depends what you are testing for. For string ops is not the fastest. For recursive Fibonacci (inefficient) LuaJIT is faster than D and Lua is faster than Perl.
There is a factor of ~5x between the slowest and fastest of these interpreters. LuaJIT with the JIT enabled is ~10x faster than even its own interpreter.
Wow, I'm not a Rubyist, so I had no idea about this. You all not only developed a faster, compliant interpreter, but Matz actually replaced MRI with an interpreter developed by a third-party as the reference Ruby interpreter? Huge props to him and the Ruby community for that.
Unfortunately, as a Pythonista (although one whose paid work is mostly in JS these days), I can't imagine that happening in the Python community (not to our credit). Too much ego wrapped up in CPython.