>>>>> "Liam" == Liam M Healy <Liam.Healy@nrl.navy.mil> writes:
Liam> Probably won't win on speed but I've always thought the Box-Muller
Liam> algorithm was quite cool.
I've implemented 5 different Gaussian RNGs (you can find them as a
part of CLOCC). Of these, the NA algorithm was the slowest, the
Ziggurat method was the fasted, and the rest were pretty close:
time in sec
1. Box-Muller 0.45
2. Ahrens NA algorithm 0.88
3. Trigonometric 0.5
4. Ratio 0.58
5. Ziggurat 0.28
(Time for 1 million numbers on a 866 MHz Pentium II, with CMUCL.)
I don't expect maxima being used in such a way that number crunching
is the crucial element, but if we can easily make it fast, why not?
Ray