lua-users home
lua-l archive

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


> It's not the cost of the function call so much as the cost of a conditional
> branch. The Lua VM very judicially uses similar tricks elsewhere to minimize
> conditional branching because it's one of the biggest--if not the
> biggest--cost factor with VMs on modern processors.

There is a more relevant cost (if you understand the full contract ;):
a call to luaD_checkstack can reallocate the stack, and therefore
invalidate all pointers to it.

-- Roberto