luajit 是 效率更高的 lua 解释器, 跟java jni 差不多,但有区别
lua 可以用 luac(lua的编译器)将lua文件源码编译成字节码形式。 字节码形式的lua文件可以向源文件一样直接读取
lua的字节码形式,对于效率的提升是有限的。字节码形式的主要作用是加快lua文件的加载速率,对源码进行保护(官方原文如下:The main advantages of precompiling chunks are: faster loading, protecting source code from accidental user changes, and off-line syntax checking. Precompiling does not imply faster execution because in Lua chunks are always compiled into bytecodes before being executed. luac simply allows those bytecodes to be saved in a file for later execution. Precompiled chunks are not necessarily smaller than the corresponding source. The main goal in precompiling is faster loading.)