On Mar 18, 2007, at 9:15 PM, Brent Fulgham wrote:
Lua is quite a bit faster than the common interpreted languages I tried. The optimized C performance number is unrealistically high because the compiler performs a kind of inline substitution to lower the number of recursive calls made. If your turn that off the speed advantage relative to Lua drops to 10.9.
It seems to me that Lua is doing very well relative to the established scripting languages, at least in the function call department.
For another take on this topic, consider
http://shootout.alioth.debian.org/.
In my tests, Lua is faster than Python and Perl in almost every category.
The places where it is slower, is probably due to poor Lua test implementations, an not Lua itself.
The two tests in which Python has a big advantage over Lua are:
pi-digits: Python has builtin multiple-precision integers, which helps tremendously.
reverse-complement: The builtin 'translate' method on strings does a lot of the hard work here, and s[::-1] does the rest :-)
We can't blame Mike Pall for poor test implementations here.