Re: Does anyone happen to have a good pure Lua/FFI qsort for int tuples?

  • From: demetri <demetri.spanos@xxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Tue, 21 Jul 2015 00:04:01 -0700


I would strongly recommend doing some pre- and post-processing of your
data set.


Right, I agree in general this would be my approach as well. But
memory is at a premium on this platform and allocating another
quarter GB of indices in an array is something I'd prefer to avoid.

Thankfully I have resolved the problem, and I apologize to everyone
for having been stupid: there was a rare branch in the code that
resulted in an additional ffi.cast of a slice of an array that, over
large numbers of invocations, would generate a ton of garbage and
then tax the garbage collector. After fixing that I am back to
"normal" territory of 2-4x C runtimes. Hooray!

Sorry for the noise everybody!

Demetri

Other related posts: