|
|
|
|
|
by CapsAdmin
1312 days ago
|
|
I'm not really answering your question here but answering more in general regarding calls to functions bound from the lua c API. There is trace stiching meant to help with code that does a lot of c calls. This was disabled in 2015 April 28 due to it being flawed but enabled again August 29 later that year with a working design. Otherwise the recommendations are to reduce and maybe cache values on the lua side of things if you cannot use ffi. Otherwise as mentioned in other comments if you can use ffi, use it. The performance benefit is significant. The downside is that the ffi API is unsafe so in the context of a game development you'd have to be careful about third party scripts from modding or similar. Another downside is if you cannot use jit (like on iOS) the performance hit can be worse than using the lua c api |
|