On 20 September 2015 at 19:43, Kristoffer Carlsson <kcarlsso...@gmail.com>
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.

Cheers,
Daniel.

Reply via email to