lua-users home
lua-l archive

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


On 12/29/2010 06:02 PM, steve donovan wrote:

For serious speed, LJ2 is the way to go, but bytecode is not a high
priority in LJ, unless I'm misunderstanding Mike's position.

Yeah, although I think I can tease out the ops initially in the stream produced by the compiler from the ones the JIT machinery rewrites (assuming I've even understood correctly that this is what's happening), actually feeding the code into LJ2 is something I have no clue about, so I may have to wait for Mr. Pall to get around to supporting dumping and loading bytecode. But certainly, my dreams are filled with being able to take advantage of the insane speed LJ2 gives, as a backend for other dynamic languages :)

For now, though, with standard Lua 5.1 bytecode, both LuaJIT 1.x and llvm-lua can already give one a performance boost, or in the latter case, allow you to compile to standalone executables and shared object files.

I've been meaning write a port of Narcissus [1] to Lua, where the interpreter walks the AST directly, and running that under LJ2. It'd be telling if an interpreter like that beat Spidermonkey or Rhino, or at the very least had comparable performance. If that were the case, then one wouldn't need to produce bytecode at all.

Cheers,
Richard

[1] http://mxr.mozilla.org/mozilla/source/js/narcissus/