News for hackers. Stuff that matters.
Re:Julia Impressions by idunning on Wednesday April 30, 2014 @11:44PM (#7678090)
I used Julia's in-built profiler to look at your code. Almost all the work is done, as you'd hope, on lines 20, 22, 33, and 35. I added @inbounds to lines 20 and 35, figuring that line 22 is mostly just the effort of calculating tanh. This dropped the running time on my computer from 10.7 seconds to 6.4 seconds, so about 60% of original running time. If I compile with gcc (gcc rnn_perf.c -O2 -o rnn_perf -lm) and run that, I get 6.2 (O3 is worse). That might not be how you compiled the C version, but regardless it looks like your C time was about 46% of the original Julia time, so its getting close. Three-fifths of the work now is in the tanh line. I'll submit a PR.
Re:Julia Impressions by ninjin on Thursday May 01, 2014 @12:00AM (#7678152)
Thanks a ton Iain, it pushed it down by 60% on my end as well. About the C code, I used -O2, the specific compiler flags are in the rnn_perf.sh file.

https://github.com/ninjin/ppod/commit/ce7665a2cfd045332e9861...

Julia is really tempting for my next project, the benefits of scripting without all the OOP cruft and a community that just shines. Also, did I mention the awesome meta programming?

Re:Julia Impressions by StefanKarpinski on Wednesday April 30, 2014 @11:53PM (#7678130)
Having people like Iain – with this kind of knowledge of numerical programming and optimization – help you out with your code is one of the major benefits of Julia programming :-)
Re:Julia Impressions by Bootvis on Thursday May 01, 2014 @04:22AM (#7678778)
This is some quality advertising on your and Iain's part. It makes me want to use Julia even more when I get the chance.
Re:Julia Impressions by JPKab on Thursday May 01, 2014 @08:49AM (#7679386)
Wow. If this is what the community in Julia is like, count me in.

I've been focusing on mastering the scientific libraries of Python and waiting until I hit performance walls before I took Julia on, but perhaps I'll start now.