lua-users home
lua-l archive

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


On Sun, Aug 10, 2014 at 4:03 PM, Mason Mackaman <masondeanm@aol.com> wrote:
> Well I just realized that string.len(str) is actually faster than str:len() if it’s in the scope of a localized version of ‘string'

If you're in such a tight inner loop that that difference is worth
considering, you could probably speed it up a little more with
something like:
local slen = string.len
slen(str)

-- 
Sent from my Game Boy.