View Single Post
08-28-13, 04:32 AM   #34
kurapica.igas
A Chromatic Dragonspawn
Join Date: Aug 2011
Posts: 152
Originally Posted by ballagarba View Post
I find his stuff very interesting to be honest.

1. Don't do premature optimization.
2. Don't sacrifice readability for negligible optimizations.

That being said, here's a PDF on performance tips for Lua written by its lead architect.

http://www.lua.org/gems/sample.pdf
Thanks for the book.

I also take back the word 'The upvalue is the slowest', I'm confused about the result too, redo the test several times today, only 1 time the upvalue is slower than others, the diff between them is little.

I prefer the custom environment just because after some time, the custom environment will store all things that the addon needed, from the point, the custom environment table will be stable compares to the _G.
  Reply With Quote