lua-users home
lua-l archive

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




On Wed, Aug 18, 2010 at 7:38 AM, steve donovan <steve.j.donovan@gmail.com> wrote:
On Wed, Aug 18, 2010 at 1:15 PM, Patrick McCavery
<patrick@cakeandfile.com> wrote:
> Everyone says globals are slower, any guesses on specifically how much
> slower? i.e half the speed of locals?

You'll really feel the difference on inner loops, otherwise not that much.

It's good to get in the habit of typing 'local' anyway - though as Rob
points out there is a 250-odd limit to the number of locals in a
single block.  If you hit this, your functions are probably too long
;)


It's actually very near 200 in practice.

 

steve d.