Lua is faster than Fortran???

sturlamolden sturlamolden at yahoo.no
Sat Jul 3 23:30:30 EDT 2010


I was just looking at Debian's benchmarks. It seems LuaJIT is now (on
median) beating Intel Fortran!

C (gcc) is running the benchmarks faster by less than a factor of two.
Consider that Lua is a dynamically typed scripting language very
similar to Python.

LuaJIT also runs the benchmarks faster than Java 6 server, OCaml, and
SBCL.

I know it's "just a benchmark" but this has to count as insanely
impressive. Beating Intel Fortran with a dynamic scripting language,
how is that even possible? And what about all those arguments that
dynamic languages "have to be slow"?

If this keeps up we'll need a Python to Lua bytecode compiler very
soon. And LuaJIT 2 is rumoured to be much faster than the current...

Looking at median runtimes, here is what I got:

   gcc               1.10

   LuaJIT            1.96

   Java 6 -server    2.13
   Intel Fortran     2.18
   OCaml             3.41
   SBCL              3.66

   JavaScript V8     7.57

   PyPy             31.5
   CPython          64.6
   Perl             67.2
   Ruby 1.9         71.1

The only comfort for CPython is that Ruby and Perl did even worse.




More information about the Python-list mailing list