Files
print_hej/reports/summary.md
T
Ein Anderssono 43870e5920 Reorganize documentation: create separate reports for each decimal level
- 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
2026-04-23 10:16:20 +02:00

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

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