lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

 >> But, do you have a *need* for more speed?

   Oops, didn't mean that to sound like a general attack on Lua's speed,

   Without question Lua is fast enough *as is* for everything I initially
expected it to do, and more.  In fact, partly due to its speed I've ended
up doing a lot more "inside" Lua than I had originally intended, leading me
to look for various techniques to optimize that code so that I can ask it
to do EVEN MORE. (within the processor budget constraints that I'm under)

   One thing that is obvious, for example, is that accessing locals is
faster than globals.  The trade-off is that locals don't make good storage
locations for large "static" data due to the setup time at function entry. 
So I was playing with various ways I might alias into a big global table
that I have, and wondering if there were anything else that could be done
to get it to perform speedwise more like locals.

   So, while wondering about the relative speed of get/set globals vs
locals, I also wondered about get/set table and any overhead it might have.
 But, if the VM knowing in advance that the table could not possibly be
tagged wouldn't yield much in performance, then it's not worth considering.