Re: Where do I send the Paypal to support the Group

  • From: demetri <demetri.spanos@xxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Fri, 12 Dec 2014 16:30:33 -0800

>
> I am already spreading the word  [link to Julia vs LuaJIT post]


This is an interesting comparison to Julia but you might want to
consider two things:

1) if these tests run short enough that milliseconds matter (I can't
tell just from looking at them), then you should get a more precise
timer than os.clock. You may want to ffi.cdef QueryPerformanceCounter
since you seem to be on Windows.

2) Since you're already doing a variant of the Julia code with typed
arrays you might do the same in your LuaJIT example. In particular,
in your sma function you could replace

local tout = {}

with

local tout = {slots = ffi.new("float[?]",numElements)}

or something analogous. That would be the most fair comparison
if I'm understanding your example correctly (if you are new to ffi
code, the wrapper table around ffi.new is one of several ways to
ensure that the allocated memory is anchored for the GC and
lasts beyond the function invocation).

Anyway, I am definitely interested in LuaJIT vs Julia comparisons
as a matter of professional education, so thanks for taking the
time to try this out :) I think this kind of work aimed at educating
newcomers is probably more valuable than monetary donations.
I think most people on this list are more pressed for free time
than they are for a few incremental donations.

Cheers,
Demetri

Other related posts: