It was thus said that the Great David Riley once stated:
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 don't know. I did some benchmarks [1] and Lua held its own against
Perl. But that's with a system provided Perl, and a stock compile of Lua
and an odd benchmark program.
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).
LuaJIT compiles to a single library and supports compiling to native x86,
PPC and ARM (and on the x86, it's around 200k for the VM/JIT compiler). It
also has a native ffi (foreign function interface) that allows you to all
any C library directly without writing bindings (as long as you have header
files). It's very impressive.
-spc (I would love to use LuaJIT at work, but our stuff has to run on
SPARC, so I get by with plain Lua)
[1]
http://boston.conman.org/2009/10/14.3