lua-users home
lua-l archive

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


>From lua-l@tecgraf.puc-rio.br Wed Jul 21 04:08:34 1999
>From: "Vincent PENQUERC'H" <vpenquerch@cr2a-di.fr>

>Why do using local variables is so much faster ?
>Is this due to tag methods ?

If you look at the code in lvm.c, you'll see that using a local variable
is quite simple (search for 'case PUSHLOCAL'), whereas using a global variable
(search for 'case GETGLOBAL') needs a call to luaV_getglobal (yes, because of
tag methods).
--lhf