lua-users home
lua-l archive

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


> Are there performance considerations for the number of C/C++ functions
> you make available to LUA?

Each function is a new global variable. You will need a small time to 
create/set this global value (to "register" the function) and a small 
amount of memory to keep it.
By "small" I mean ~5uS in a Pentium 333 + ~60 bytes. 


> Is there anyway to get the list of C Functions that are LUA currently
> has available?

You can traverse all global variables (use `foreachvar' or `nextvar')
and select those whose values are C functions:

  Ctag = tag(print)
  foreachvar(function (n,v) if tag(v) == Ctag then print(n) end end)

-- Roberto