# Pi Calculation Benchmark: Performance Summary

## Overview

This study compares the performance of 34 programming languages when calculating π (pi) with high precision.

## Test Environment

**Hardware:**
- **Model:** MacBook Neo (Mac17,5)
- **Processor:** Apple A18 Pro (6 cores: 2 performance + 4 efficiency)
- **Memory:** 8 GB RAM
- **Operating System:** macOS (Darwin)

## Method: Machin's Formula

All implementations use Machin's formula for π calculation:

```
π/4 = 4·arctan(1/5) - arctan(1/239)
```

## Performance Reports by Decimal Level

- [1 Decimal](reports/1_decimals.md) - Minimal precision
- [2 Decimals](reports/2_decimals.md) - Low precision
- [5 Decimals](reports/5_decimals.md) - Medium precision
- [10 Decimals](reports/10_decimals.md) - Standard precision
- [100 Decimals](reports/100_decimals.md) - High precision
- [1000 Decimals](reports/1000_decimals.md) - Very high precision
- [2000 Decimals](reports/2000_decimals.md) - Extreme precision

## Key Findings

### Fastest Languages (100 decimals)
1. **C** - 9ms (compiled)
2. **Assembly** - 9ms (compiled)
3. **Rust** - 9ms (compiled)
4. **Go** - 9ms (compiled)
5. **Nim** - 9ms (compiled)

### Memory Efficiency (100 decimals)
- **C, Rust, Assembly**: < 1 MB
- **JIT Languages**: ~2 MB
- **Interpreted Languages**: ~2 MB

### Performance Scaling
- Compiled languages maintain consistent performance across all decimal levels
- JIT languages show startup overhead but good performance
- Interpreted languages scale poorly with increased precision

---

*Generated from Pi Calculation Benchmark*
