2 ms·
Some games use it. I'm under the impression the number is much larger than 3. There are competing interpreters like Havok. However, vanilla Lua is pretty fast
by dottrap 13y ago
Some games use it. I'm under the impression the number is much larger than 3. There are competing interpreters like Havok.
However, vanilla Lua is pretty fast to begin with. Additionally, the types of optimization you do with vanilla Lua are the opposite kind you do with LuaJIT and vice versa. Generally you need to decide early in the project which you want to go with because it impacts how you write code. And it isn't always guaranteed that LuaJIT will be faster. And since game engine cores are written in C/C++, this optimization works against LuaJIT.
Ultimately, games need to stay within their fps budget. If Lua is high on the CPU, but the game is still in budget, nobody really cares. And CPU profiling doesn't always tell the whole story since many things can be GPU bound. It could very well be that the game is already GPU bound so getting more CPU back won't help.
- dottrap 13y agoOne more thing. Sometimes modifying Lua is desired. Modifying vanilla Lua is easy. Modifying LuaJIT is not so easy.