Gaussian random number generators
Posted: December 06 2007
People my be interested to see
http://www.cse.cuhk.edu.hk/~phwl/mt/pub ... cmcs07.pdf
- a comparison of various Gaussian random number generators.
I've tried the Ziggurat algorithm - which seems to be about best - using the code at
http://www.netlib.org/random/ziggurat.f90
It's about 3-4 times faster than the Box-Muller rejection method (used previously my me and, I think, Healpix). For example adding uncorrelated noise to an nside=2048 polarized map goes from ~10 seconds to ~3 seconds on one processor when switching to the Ziggurat method.
One potential worry is that the period of the above code is only 2^32. Anyone know (or fancy writing) a 64-bit implementation?
http://www.cse.cuhk.edu.hk/~phwl/mt/pub ... cmcs07.pdf
- a comparison of various Gaussian random number generators.
I've tried the Ziggurat algorithm - which seems to be about best - using the code at
http://www.netlib.org/random/ziggurat.f90
It's about 3-4 times faster than the Box-Muller rejection method (used previously my me and, I think, Healpix). For example adding uncorrelated noise to an nside=2048 polarized map goes from ~10 seconds to ~3 seconds on one processor when switching to the Ziggurat method.
One potential worry is that the period of the above code is only 2^32. Anyone know (or fancy writing) a 64-bit implementation?