rusty_pi
Implementation of Monte Carlo PI approximation algorithm in Rust Python bindings.
Time of 100M iterations approximation on Core i7 10th gen:
- Python ~ 31.82 s
- Rust ~ 1 s
How to run code locally:
- python3.10 -m venv .venv
- source .venv/bin/activate
- pip install -r requirements.txt
- maturin develop --release
- python calculate_pi.py
Useful links:
- PyO3 docs: https://pyo3.rs/v0.15.0/