On Feb 8, 2012, at 9:40 PM, Sean Conner wrote:
[6] The LuaJIT is a drop-in replacement for the
standard Lua intepreter.
You can use either one interchangibly---even if you use Lua as a
library. You can either link against lua or luajit. Also, the code
LuaJIT produces is *fast* (although Lua itself is one of the fastest
interpreters out there) and can rival C code in some cases.
I've not seen this "fastest" claim to be true. The plain old Lua
interpreter
certainly isn't bad as straight bytecode interpreters go (much faster than
CPython, for example), and it's definitely one of the smallest in terms of
memory footprint (even with the full standard libraries). It's not the speediest,
though.
I need to find the benchmarks I was looking at (it was from the point of
view of implementing in games; Lua landed in the "great for scripting,
maybe OK for AI but probably not ideal for physics" zone, but its memory
consumption was probably the smallest out of everything (they only
considered interpreted languages, so raw C/C++ aren't included).
I haven't seen much of LuaJIT, but I know there was a project (IronLua?) to
compile Lua to CLI bytecode to be run on Mono. Mono (which also JITs its
bytecode) is pretty darn fast, and I'd give it a "nearly as fast as C with
some important caveats" prize. It's a memory hog, though (probably because
of its enormous .NET standard library).
- Dave