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

  • From: Mike Pall <mike-1412@xxxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Thu, 11 Dec 2014 00:29:11 +0100

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: