关于lua,luajit,以及lua的字节码形式

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.

JIT编译,动态编译与自适应动态编译
深入浅出 JIT 编译器
Java程序员必学的Hotspot JVM选项

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值