lua-users home
lua-l archive

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


My hope was that someone with better knowledge of the VM than myself
might be able to shed some light.

My initial thoughts were that in lua it's better to pass more parameters
on the stack (when calling a lua_CFunction) than passing a table because
on the C side it becomes expensive to access the table.

This is counter to C/C++ where it is usually more optimal to pass a
single reference parameter containing parameters than to pass many
parameters.

> 
> 
> One thing beats it - if someone else already knows the answer :)
> 
> > 
> > > So, my question is, in terms of performance, which is better?
> > 
> > Nothing beats measurement to answer such questions.
> > 
> > -- Roberto
> > 
>