-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
In the name of fairness, maybe you should add a cached function call for the Lua C API. You can do this by looking up the function to call and storing it in the stack, then on each iteration you can then call lua_pushvalue[1] to copy the value (this would ensure the stack index is not popped when the function is called). Alternatively, you could store the function in the registry and use lua_geti [2] / lua_rawgeti [3].
[1] http://www.lua.org/manual/5.3/manual.html#lua_pushvalue
[2] http://www.lua.org/manual/5.3/manual.html#lua_geti
[3] http://www.lua.org/manual/5.3/manual.html#lua_rawgeti
Metadata
Metadata
Assignees
Labels
No labels