I'm currently expanding a simulation model that relies heavily upon random normal distributed numbers. Currently it uses std::normal_distribution, but it's too slow.
Is there a way to implement a fast random normal distribution? The values don't have to be unique as long as it follows a normal distribution.
The Ziggurat generator by Marsaglia and Tsang (JSS, 2000) has been seen to be both statistically sound and fast. You do however want the revised Ziggurat normal generator which uses a better underlying uniform generator as per the comment of Leong et al (JSS, 2005).
I have the original papers as well as a few review papers in this GitHub directory which is part of a Ziggurat C++ implementation for R.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With