A repository demonstrating the parallization of the calculation of pi using Rust.
The calculation of pi is a popular method to test parallelism. Specifically, the Leibniz formula, given as:
is embarassingly parallelizable.
This program compares multiple crates for parallel computation in the Rust ecosystem:
The results of the comparison is generated as a image using the plotters library, and stored in /images/pi_comparison.png.
git clone https://github.com/alexsyou/pi_parallel.git
cd pi_parallel
cargo r --release
To ensure the iterator is optimized correctly, run with the release flag (--release
).