[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Lua's great (and LuaJIT's broken)
- From: "Sebastien Loisel" <loisel@...>
- Date: Fri, 27 Jun 2008 18:08:19 -0400
Thanks for your quick reply.
i'm curious; how does plain Lua compares to other scrip languages in your code?
The only other scripting language that I use is MATLAB, which has a JIT. When the JIT is succesful, MATLAB can run as fast as a compiled language like C or close. The JIT is generally succesful when you have loops like
for k=1:n v[k]=u[k+2]-2*u[k+1]+u[k]; end
Of course, this is not typical MATLAB code, which instead would be written
However, I think on the modern MATLAB JIT, the first snippet is actually faster than the second, more MATLAB-ish one. O_o
The first snippet compiles to something which has C-like performance.
If you want a more detailed comparison, which unforunately excludes MATLAB, see
You will notice that right now, LISP does a lot better than Lua.