https://github.com/timholy/ProfileView.jl is invaluable for performance tweaking.
Are you on 0.4? On Sunday, September 20, 2015 at 8:26:08 PM UTC+2, Milan Bouchet-Valat wrote: > > Le dimanche 20 septembre 2015 à 20:22 +0200, Daniel Carrera a écrit : > > > > > > On 20 September 2015 at 19:43, Kristoffer Carlsson < > > kcarl...@gmail.com <javascript:>> wrote: > > > Did you run the code twice to not time the JIT compiler? > > > > > > For me, my version runs in 0.24 and Daniels in 0.34. > > > > > > Anyway, adding this to Daniels version: > > > https://gist.github.com/KristofferC/c19c0ccd867fe44700bd makes it > > > run in 0.13 seconds for me. > > > > > > > > > > Interesting. For me that change only makes a 10-20% improvement. On > > my laptop the program takes about 1.5s which is similar to Adam's. So > > I guess we are running on similar hardware and you are probably using > > a faster desktop. In any case, I added the change and updated the > > repository: > > > > https://github.com/dcarrera/sim > > > > Is there a good way to profile Julia code? So I have been profiling > > by inserting tic() and toc() lines everywhere. On my computer > > @profile seems to do the same thing as @time, so it's kind of useless > > if I want to find the hot spots in a program. > Sure : > http://julia.readthedocs.org/en/latest/manual/profile/ > > > Regards >