lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


John C. Turnbull wrote:
[...]
Does anyone know a performance comparison of JIT’ed Lua versus something like V8 JavaScript? Lua has the reputation as the fastest scripting language (in fact that’s how I came across it) but does the JIT compiler used in modern JavaScript implementations like V8 greatly narrow the performance gap? JavaScript is clearly a much more comprehensive and complex language so I would be surprised if it could be executed faster than Lua but it’s the speed that we really need over language features.

I did some quick-and-dirty benchmarks as part of Clue. Back then, V8 wasn't really set up for running command-line Javascript applications so I was never able to integrate it into the benchmark suite (I should check again), and the benchmarks are astonishingly artificial, but I saw that while V8 was way faster than any other Javascript interpreter out there, LuaJIT was still a lot better.

However, I wasn't quite testing like-for-like, so I'm not sure that this was a meaningful result. I need to go and have another look to see if V8 has a proper command-line driver these days.

--
┌─── dg@cowlark.com ───── http://www.cowlark.com ─────
│
│ "They laughed at Newton. They laughed at Einstein. Of course, they
│ also laughed at Bozo the Clown." --- Carl Sagan