Good point, Does this mean that since I am invoking the GC to avoid crashing and since the FFI arrays are outside of it's purview that it may be able to complete the GC operation faster? My average GC's run about 0.3 seconds so a saving there would be helpful.
On 12/10/2014 3:29 PM, Mike Pall wrote:
Joe Ellsworth wrote:In this instance it happened to prove that it probably is not worth the overhead of using the FFI array but if it had saved 20% then it could have a profound impact on total run time.But when you use this in a real setting, you have to consider that the GC needs to traverse Lua arrays, but not FFI arrays. Especially with out-of-cache loads, that's a considerable cost you need to factor into the whole comparison. --Mike