Rust + Python project
calculate-pi-python-vs-rust
2021
A small benchmark and demo project comparing Python, Rust, and Rust called from Python with PyO3.
- Rust
- Python
- PyO3
- Benchmarking
Overview
calculate-pi-python-vs-rust compares a simple numerical workload across Python, Rust, and a Rust implementation called from Python through PyO3.
The project is intentionally small, which makes the tradeoff easy to see: Python is quick to write and easy to read, Rust gives predictable performance, and PyO3 provides a practical bridge when a Python program needs a faster core.
It remains a useful snapshot of how I think about performance work: measure something concrete, keep the example understandable, and explain the boundary between developer ergonomics and runtime speed.