Very neat. Just in case this gets posted to the interwebz, it is worth pointing out that the performance advantage for Julia can probably be explained by differences in the underlying RNG. We use dsFMT, which is known to be one of (if not the?) fastest MT libraries around. I could not find any published comparisons in a quick google, but based on this test harness [1], dsFMT may be significantly faster than std::mt19937:
``` ihnorton@julia:~/tmp/cpp-random-test$ ./random-real C++11 : 2.34846 Boost : 0.371674 dSFMT : 0.281255 GSL : 0.649981 ``` [1] https://github.com/yomichi/cpp-random-test On Mon, Jan 5, 2015 at 10:12 AM, <lapeyre.math1...@gmail.com> wrote: > Oh, and, (I forgot to mention!) the Julia code runs much faster. > > > On Monday, January 5, 2015 3:56:07 PM UTC+1, lapeyre....@gmail.com wrote: >> >> Hi, here is a comparison of Julia and C++ for simulating a random walk >> <https://github.com/jlapeyre/ranwalk-Julia-vs-Cxx>. >> >> It is the first Julia program I wrote. I just pushed it to github. >> >> --John >> >>