|
My *guess* is that the one-big-Lua-function approach has much fewer cache misses, and that this is largely responsible for this performance improvement. I should also note that this was on the PS2, where cache misses hurt dearly.
I think another reason might be that a Lua-C/C++-Lua transition is relatively expensive. So reducing the number of Lua calls to a C++/C engine, like your calling everything in one go approach, will be cheaper. Though I'm not sure exactly how big the savings are in real-world examples... Ashwin. -- no signature is a signature