You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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].
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
The text was updated successfully, but these errors were encountered: