lua-users home
lua-l archive

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


On 06/27/2013 05:30 AM, Eric Wing wrote:
Is this the expected behavior? I know my simple arguments in this case
make things much easier, but I was always under the impression that
crossing the language bridge was much more expensive than staying in
the interpreter (i.e. you're only supposed to win if the stuff you do
in your function on the native side is computationally expensive
enough to overcome the cost of calling the function).



If you look at the c code of the Lua interpreter, this is not really surprising. There is not really a language bridge at that point. The Lua interpreter is in C as well. All it does is a call of a C function pointer.

--

Thomas