I just ran several of these benchmarks using the code and compilation flags available at https://github.com/jesusfv/Comparison-Programming-Languages-Economics . On my computer Julia is faster than C, C++, and Fortran, which I find surprising, unless some really dramatic optimization happened since 0.2.
My results are, on a Linux machine: Julia 0.4.2: 1.44s Julia 0.3.13 1.60s C, gcc 4.8.4: 1.65s C++, g++: 1.64s Fortran, gfortran 4.8.4: 1.65s Matlab R2015b : 5.65s Matlab R2015b, Mex inside loop: 1.83s Python 2.7: 50.9s Python 2.7 Numba: 1.88s with warmup It's possible there's something bad about my configuration as I don't normally use C and Fortran. In the paper their C/Fortran code runs in 0.7s, I don't think their computer is twice as fast as mine, but maybe it is. On Monday, June 16, 2014 at 11:52:07 AM UTC-4, Florian Oswald wrote: > > Dear all, > > I thought you might find this paper interesting: > http://economics.sas.upenn.edu/~jesusfv/comparison_languages.pdf > > It takes a standard model from macro economics and computes it's solution > with an identical algorithm in several languages. Julia is roughly 2.6 > times slower than the best C++ executable. I was bit puzzled by the result, > since in the benchmarks on http://julialang.org/, the slowest test is > 1.66 times C. I realize that those benchmarks can't cover all possible > situations. That said, I couldn't really find anything unusual in the Julia > code, did some profiling and removed type inference, but still that's as > fast as I got it. That's not to say that I'm disappointed, I still think > this is great. Did I miss something obvious here or is there something > specific to this algorithm? > > The codes are on github at > > https://github.com/jesusfv/Comparison-Programming-Languages-Economics > > >
