Recently there is a lot of noise about Julia. I have decided to test its speed in simulation tasks on my toy Cont model. I thought I had vectorized my GNU R code pretty well, but Julia is much faster.
The model was described in my earlier posts so let us go down to a comparison:
Here is my GNU R code:
cont.run(1000, 10000, 1000, 0.005, 10.0, 0.01)))
It’s execution time is a bit below 10 seconds on my laptop.
An equivalent Julia code is the following:
And on my machine it takes a bit less than 0.7 seconds to run.
So we get over tenfold speedup. This is a significant difference for simulation experiments.
I will have to dig more into Julia in the future.