Fast Gaussian Distributed Pseudorandom Number Generation in Java via the Ziggurat Algorithm
Vincent A. Cicirello

TL;DR
This paper evaluates the performance of a Java implementation of the ziggurat algorithm for Gaussian random number generation, comparing it with Java 17's built-in methods, and highlights its relevance for legacy systems.
Contribution
It provides a Java implementation of the original ziggurat algorithm compatible with pre-Java 17 PRNGs, filling a gap left by Java 17's optimized but limited support.
Findings
Java 17's modified ziggurat is faster than the implementation for supported PRNGs.
Legacy PRNGs like Random, SecureRandom, and ThreadLocalRandom still use the polar method.
The original ziggurat implementation works with any PRNG, useful for pre-Java 17 environments.
Abstract
We report on experiments with the ziggurat algorithm for generating Gaussian distributed random numbers. The study utilizes our open source Java implementation that was introduced originally for Java 11 at a time when the Java API only provided the much slower polar method. Our Java implementation of the ziggurat algorithm is a port of the GNU Scientific Library's C implementation. Java 17 introduced a significant overhaul of pseudorandom number generation, including several modern pseudorandom number generators (PRNGs) as well as additional functionality, among which includes switching from the polar method to a modified ziggurat algorithm. In the experiments of this paper, we explore whether there is still a need for our implementation for Java 17+ applications. Our results show that Java 17's modified ziggurat is faster than our implementation for the PRNGs that support it. However,…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsChaos-based Image/Signal Encryption
