lua-users home
lua-l archive

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


>>> gz@tset.de 01/19/05 10:55PM >>>
SD> Here are some numbers:
SD>    - global function call                     1.0
SD>    - copying methods into class        1.5
SD>    - custom __index  function            5.0  (!)
SD>    - nested metatables                      2.0
>What do these numbers mean?
>Plus, you left out the __index table approach, which should do rather
>well.

Consider them arbitrary (it takes one second for 1.5e6 global
function calls on this machine);  it's merely intended for 
comparison purposes.

Actually, both the 2nd and the 4th numbers are using the 
__index table approach;  it shows that it always 
outperforms a function lookup.

steve d.