lua-users home
lua-l archive

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


>From: Christophe Gimenez <chris@kandji.com>

>1) LUA speed
>
>- Does the number of functions declared in a LUA file have an effect onto 
>the speed of lua_callfunction() ? (is 1000 functions a lot ???)

No.
Even if you use lua_call, which calls the function by name and thus calls
lua_getglobal, the time to locate the function should not depend on the
number of globals defined, because lua uses hashing.

>- How to determine the amount of memory needed to load a LUA file ? (As the 
>text file is converted to bytecode I think it's not the size of the file)

It should be roughly the size of the file output by luac on this file.
What do you need this for?
--lhf