[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: string.len(str) vs str:len()
- From: Elias Barrionovo <elias.tandel@...>
- Date: Thu, 7 Aug 2014 15:21:45 -0300
On Thu, Aug 7, 2014 at 3:14 PM, Mason Mackaman <masondeanm@aol.com> wrote:
> Also doesn’t there have to be some emphasis on the locality (can I say that?) of getmetatable(‘’).__index, otherwise it wouldn’t be any faster?
These are unrelated parts. The scope of the variable (whether it is
local or global) matters when getting the variable itself, be it
`string` or `str`. *
[1] In the latter case, before even looking for the metatable. In
fact, lua doesn't call gemetatable() per se, but actually uses that
instruction `SELF` Tim mentioned earlier, which then internally looks
for the metatable.
--
NI!
() - www.asciiribbon.org
/\ - ascii ribbon campaign against html e-mail and proprietary attachments
- References:
- string.len(str) vs str:len(), Mason Mackaman
- Re: string.len(str) vs str:len(), Thiago L.
- Re: string.len(str) vs str:len(), Mason Mackaman
- Re: string.len(str) vs str:len(), Thiago L.
- Re: string.len(str) vs str:len(), Mason Mackaman
- Re: string.len(str) vs str:len(), Coda Highland
- Re: string.len(str) vs str:len(), Thiago L.
- Re: string.len(str) vs str:len(), Mason Mackaman
- Re: string.len(str) vs str:len(), Coda Highland
- Re: string.len(str) vs str:len(), Mason Mackaman
- Re: string.len(str) vs str:len(), Mason Mackaman
- Re: string.len(str) vs str:len(), Mason Mackaman
- Re: string.len(str) vs str:len(), Elias Barrionovo
- Re: string.len(str) vs str:len(), Mason Mackaman