Tuesday, July 18, 2006

LuaJIT

I have been playing around with the just in time compiler for Lua. I was excited to see there was a JIT compiler because as a purely interpreted language Lua s the fastest out there. Took me a bit to write up a working ebuild to install it on my gentoo box but it was well worth it.

I've run two benchmarks so far (CPU time)




To give you a comparison here are the results listed for n-body on the shootout

  • Python: 2925.45


  • Ruby: 5561.54


  • PHP: 2665.16


  • Perl: 1905.44


  • Lua (nonjit): 538.00


Now, Java JDK is still way better coming in at 16.07 but still it seems LuaJIT is on the right track! Granted this is just two small tests and no one should take that as a defacto victory of luajit over perl/php/etc.



Linux becka 2.6.16-gentoo-r9 #2 PREEMPT Sun Jun 18 16:40:00 EDT 2006 i686 Intel(R) Pentium(R) 4 CPU 2.20GHz GNU/Linux

MemTotal: 514832 kB

MemFree: 14312 kB

No comments:

Post a Comment