Re: Projects I may be willing to sponsor - FFI Array Sum versus native table results

  • From: Joe Ellsworth <joexdobs@xxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Wed, 10 Dec 2014 15:45:23 -0800

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



Other related posts: