سؤال

Related: Differences between standard Lua bytecode and LuaJIT bytecode

I'm writing a Lua bytecode interpreter, and I'm trying to decide between LuaJIT and luac to generate the initial bytecode. Since I'm writing an interpreter, I'm not going to get any of the JIT performance, so it all comes down to the quality of the compiler and design of the generated bytecode.

Is either compiler significantly better?

I'm writing this in Dart (also interpreted), so any free optimization from the compiler is appreciated.

هل كانت مفيدة؟

المحلول

I would go for LuaJIT bytecode. Mike Pall has written that compared to standard Lua bytecode, LuaJIT bytecode is 40% smaller. Also, Tim Caswell (contributor to node.js) has announced a new project called brozula, which allows you to convert LuaJIT bytecode into JavaScript and execute it in browser, so head over to the project site for some inspiration.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top