Topic: Scripting Performance

Hi, quick question.  I'm not very familiar with Lua (I'm more familiar with C++), so I was just wondering if everyone has any insight into this.

Just what is the performance of calling functions using Lua, and doing various computations with Lua in Maratis?  I'm mostly curious as to how much you can get away with, AI computations for example, or if scripting should be used only for basic controls and the rest done in C++?

Re: Scripting Performance

Hi, in general, intensive calculation (like physics, or complex AI) should be done in C++, and the "game" logic in lua.

Lua is one of the fastest dynamic langage, it will basically run 2 to 50 times slower than C/C++.
There is also an optimized version of Lua called "LuaJIT" that actually compiles Lua at runtime, and will run 1 to 2 times slower than C/C++ only. But runtime compilation is not allowed on all platform (like iOS).

Re: Scripting Performance

Hey Mike!

You might take a look here: http://forum.maratis3d.com/viewtopic.php?pid=6814#p6814

Sponk