Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Looking through the julia code, I saw quite a bit of memory management, which did surprise me. Generally with Julia, you want to allocate memory, once, to avoid penalties of reallocating memory and gc.

I pulled the code down, placed the data on a ramdisk so as to not impact benchmark measurements, with physical issues.

I built the C code, and ran the two julia codes. My timing looked like this:

version t(raw) t(gz)

c1 1.47s 8.31s

jl1 3.80s 15.82s

jl2x 5.85s 17.86s

py1 fails

py2 6.92s 29.62s

I don't have lua, nim, or crystal on my machine. This is Julia 1.4.1 BTW. Running Linux Mint 19.3 on my laptop, 5.3.0-51-generic kernel.

Beyond putting the data and compressing it with pigz for the compressed version, no optimizations were done. Putting the data on ramdisk optimizes all codes.

My thoughts: The author noted that Julia has long startup/run times. This is true, for the first compilation of modules you use. As a reflex these days I (and I am guessing most Julia users) do a "using $MODULE" after adding it. This makes the startup times less painful, for most modules used. Plotting, with the Plots module, is still a problem, though it has gotten dramatically better over time.

Basically, if you run your code more than once, with the modules being compiled into your cache, the nice part is that startup time is significantly better. Such that Python reverts to its lower performance than Julia. If the startup time on first run is important (think of it like a PyPy compilation step along with a run of the code), and you'll only ever run a code once, and for the less than 1/2 minute that it will take for this example, use whatever it is you are comfortable with.

FWIW, the author noted, with implied disdain, that Julia users are telling them that they are "holding the phone wrong." Looking over the code, specifically all the memory allocation bits, I could see that. Basically, I'm not sure how much, if any of that, is actually needed.

That said, very limited critique of the tests. I like to see "real world" examples of use. Kudos to the author for sharing!

[edited to "fix" table ... not sure how to do real tables here]



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: