43870e5920
- Create reports/ directory with detailed performance reports - Simplify README.md to provide overview and summary - Add links to detailed reports for each decimal level (1, 2, 5, 10, 100, 1000, 2000) - Keep summary table and key findings in main README - Remove verbose charts from main README to reduce noise
1.5 KiB
1.5 KiB
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 - Minimal precision
- 2 Decimals - Low precision
- 5 Decimals - Medium precision
- 10 Decimals - Standard precision
- 100 Decimals - High precision
- 1000 Decimals - Very high precision
- 2000 Decimals - Extreme precision
Key Findings
Fastest Languages (100 decimals)
- C - 9ms (compiled)
- Assembly - 9ms (compiled)
- Rust - 9ms (compiled)
- Go - 9ms (compiled)
- 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