|
|
||
|
On 1 Feb 2008, at 22:22, Mike Pall wrote:
If, on the other hand:
a) the loop you mention is re-written in Lua, b) the variable r is a table, and c) r.a is a plain table field lookup.
... then the compiler could probably optimize most of the overhead away.
Rules of thumb: write all of it in Lua, use Lua tables exclusively for data structures, avoid frequent upcalls from C to Lua, avoid calling "black-box" C functions in tight loops.
Interesting. Thanks,
-jcw