Skip to content

A repository demonstrating parallelization of pi calculation using Rust

Notifications You must be signed in to change notification settings

alexsyou/pi_parallel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pi_Parallel

A repository demonstrating the parallization of the calculation of pi using Rust.

Introduction

The calculation of pi is a popular method to test parallelism. Specifically, the Leibniz formula, given as:

$$ 1 - \frac{1}{3} + \frac{1}{5} - \frac{1}{7} + \frac{1}{9} \dots = \frac{\pi}{4} $$

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.

Comparison of pi from pi_parallel

Installation

git clone https://github.com/alexsyou/pi_parallel.git
cd pi_parallel
cargo r --release

To Run

To ensure the iterator is optimized correctly, run with the release flag (--release).

About

A repository demonstrating parallelization of pi calculation using Rust

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages