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
This commit is contained in:
Ein Anderssono
2026-04-23 10:16:20 +02:00
parent 9c0e2f4dda
commit 43870e5920
13 changed files with 1673 additions and 811 deletions
+44
View File
@@ -0,0 +1,44 @@
# Performance Report: 1000 Decimals
## 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)
## Performance Charts
**Compiled Languages:**
```mermaid
xychart-beta
title "Compiled Languages - Time (ms) at 1000 decimals"
x-axis ["Assembly", "C", "C++", "Rust", "Go", "Nim", "Odin", "Fortran", "Swift", "Crystal"]
y-axis "Time (ms)" 0 --> 35
bar [9, 9, 30, 9, 9, 9, 9, 31, 29, 29]
```
**JIT-Compiled Languages:**
```mermaid
xychart-beta
title "JIT-Compiled Languages - Time (ms) at 1000 decimals"
x-axis ["Java", "C#", "Kotlin", "Julia"]
y-axis "Time (ms)" 0 --> 310
bar [57, 57, 83, 299]
```
**Interpreted Languages:**
```mermaid
xychart-beta
title "Interpreted Languages - Time (ms) at 1000 decimals"
x-axis ["Python", "Perl", "PHP", "Ruby", "JavaScript"]
y-axis "Time (ms)" 0 --> 240
bar [60, 103, 79, 79, 233]
```
---
*Generated from Pi Calculation Benchmark - 1000 decimals precision*
+52
View File
@@ -0,0 +1,52 @@
# Performance Report: 100 Decimals
## 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)
## Performance Charts
| Language | Time (ms) | Memory (MB) | Status |
|----------|-----------|-------------|--------|
| Assembly | 9 | 0 | ✓ |
| C | 9 | 0 | ✓ |
| C++ | 9 | 0 | ✓ |
| Rust | 9 | 0 | ✓ |
| Go | 9 | 0 | ✓ |
| Nim | 9 | 0 | ✓ |
| Odin | 9 | 0 | ✓ |
| Swift | 29 | 0 | ✓ |
| Fortran | 27 | 0 | ✓ |
| Objective-C | 31 | 752 | ✓ |
| D | 35 | 10154 | ✓ |
| Crystal | 28 | 0 | ✓ |
| Zig | 33 | 2730 | ✓ |
| Haskell | 9 | 0 | ✓ |
| Lua | 29 | 0 | ✓ |
| Python | 57 | 2000 | ✓ |
| Java | 57 | 2000 | ✓ |
| C# | 57 | 2016 | ✓ |
| JavaScript | 84 | 2032 | ✓ |
| TypeScript | 154 | 2032 | ✓ |
| Perl | 55 | 2000 | ✓ |
| PHP | 77 | 2032 | ✓ |
| Ruby | 79 | 2000 | ✓ |
| Julia | 290 | 2032 | ✓ |
| Elixir | 898 | 2037 | ✓ |
| Erlang | 130 | 2037 | ✓ |
| R | 349 | 2032 | ✓ |
| Scala | 58 | 2000 | ✓ |
| Kotlin | 83 | 2032 | ✓ |
| Dart | 31 | 11749 | ✓ |
| Bash | 32 | 2000 | ✓ |
| Brainfuck | 54 | 2005 | ✓ |
---
*Generated from Pi Calculation Benchmark - 100 decimals precision*
+44
View File
@@ -0,0 +1,44 @@
# Performance Report: 10 Decimals
## 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)
## Performance Charts
**Compiled Languages:**
```mermaid
xychart-beta
title "Compiled Languages - Time (ms) at 10 decimals"
x-axis ["Assembly", "C", "C++", "Rust", "Go", "Nim", "Odin", "Fortran", "Swift", "Crystal"]
y-axis "Time (ms)" 0 --> 40
bar [9, 9, 9, 9, 9, 9, 9, 21, 29, 29]
```
**JIT-Compiled Languages:**
```mermaid
xychart-beta
title "JIT-Compiled Languages - Time (ms) at 10 decimals"
x-axis ["Java", "C#", "Kotlin", "Julia"]
y-axis "Time (ms)" 0 --> 310
bar [58, 58, 83, 302]
```
**Interpreted Languages:**
```mermaid
xychart-beta
title "Interpreted Languages - Time (ms) at 10 decimals"
x-axis ["Python", "Perl", "PHP", "Ruby", "JavaScript"]
y-axis "Time (ms)" 0 --> 90
bar [57, 54, 78, 79, 83]
```
---
*Generated from Pi Calculation Benchmark - 10 decimals precision*
+44
View File
@@ -0,0 +1,44 @@
# Performance Report: 1 Decimal
## 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)
## Performance Charts
**Compiled Languages:**
```mermaid
xychart-beta
title "Compiled Languages - Time (ms) at 1 decimal"
x-axis ["Assembly", "C", "C++", "Rust", "Go", "Nim", "Odin", "Fortran", "Swift", "Crystal"]
y-axis "Time (ms)" 0 --> 35
bar [10, 10, 9, 9, 9, 9, 9, 28, 29, 28]
```
**JIT-Compiled Languages:**
```mermaid
xychart-beta
title "JIT-Compiled Languages - Time (ms) at 1 decimal"
x-axis ["Java", "C#", "Kotlin", "Julia"]
y-axis "Time (ms)" 0 --> 300
bar [57, 58, 83, 297]
```
**Interpreted Languages:**
```mermaid
xychart-beta
title "Interpreted Languages - Time (ms) at 1 decimal"
x-axis ["Python", "Perl", "PHP", "Ruby", "JavaScript"]
y-axis "Time (ms)" 0 --> 90
bar [57, 54, 78, 79, 82]
```
---
*Generated from Pi Calculation Benchmark - 1 decimal precision*
+44
View File
@@ -0,0 +1,44 @@
# Performance Report: 2000 Decimals
## 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)
## Performance Charts
**Compiled Languages:**
```mermaid
xychart-beta
title "Compiled Languages - Time (ms) at 2000 decimals"
x-axis ["Assembly", "C", "C++", "Rust", "Go", "Nim", "Odin", "Fortran", "Swift", "Crystal"]
y-axis "Time (ms)" 0 --> 35
bar [9, 27, 33, 9, 9, 9, 9, 31, 29, 29]
```
**JIT-Compiled Languages:**
```mermaid
xychart-beta
title "JIT-Compiled Languages - Time (ms) at 2000 decimals"
x-axis ["Java", "C#", "Kotlin", "Julia"]
y-axis "Time (ms)" 0 --> 310
bar [57, 57, 83, 299]
```
**Interpreted Languages:**
```mermaid
xychart-beta
title "Interpreted Languages - Time (ms) at 2000 decimals"
x-axis ["Python", "Perl", "PHP", "Ruby", "JavaScript"]
y-axis "Time (ms)" 0 --> 240
bar [60, 103, 79, 79, 233]
```
---
*Generated from Pi Calculation Benchmark - 2000 decimals precision*
+44
View File
@@ -0,0 +1,44 @@
# Performance Report: 2 Decimals
## 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)
## Performance Charts
**Compiled Languages:**
```mermaid
xychart-beta
title "Compiled Languages - Time (ms) at 2 decimals"
x-axis ["Assembly", "C", "C++", "Rust", "Go", "Nim", "Odin", "Fortran", "Swift", "Crystal"]
y-axis "Time (ms)" 0 --> 35
bar [9, 9, 9, 9, 9, 9, 9, 26, 29, 28]
```
**JIT-Compiled Languages:**
```mermaid
xychart-beta
title "JIT-Compiled Languages - Time (ms) at 2 decimals"
x-axis ["Java", "C#", "Kotlin", "Julia"]
y-axis "Time (ms)" 0 --> 300
bar [57, 57, 83, 294]
```
**Interpreted Languages:**
```mermaid
xychart-beta
title "Interpreted Languages - Time (ms) at 2 decimals"
x-axis ["Python", "Perl", "PHP", "Ruby", "JavaScript"]
y-axis "Time (ms)" 0 --> 90
bar [57, 53, 79, 80, 83]
```
---
*Generated from Pi Calculation Benchmark - 2 decimals precision*
+44
View File
@@ -0,0 +1,44 @@
# Performance Report: 5 Decimals
## 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)
## Performance Charts
**Compiled Languages:**
```mermaid
xychart-beta
title "Compiled Languages - Time (ms) at 5 decimals"
x-axis ["Assembly", "C", "C++", "Rust", "Go", "Nim", "Odin", "Fortran", "Swift", "Crystal"]
y-axis "Time (ms)" 0 --> 35
bar [8, 10, 9, 9, 9, 9, 9, 15, 28, 28]
```
**JIT-Compiled Languages:**
```mermaid
xychart-beta
title "JIT-Compiled Languages - Time (ms) at 5 decimals"
x-axis ["Java", "C#", "Kotlin", "Julia"]
y-axis "Time (ms)" 0 --> 300
bar [57, 57, 83, 292]
```
**Interpreted Languages:**
```mermaid
xychart-beta
title "Interpreted Languages - Time (ms) at 5 decimals"
x-axis ["Python", "Perl", "PHP", "Ruby", "JavaScript"]
y-axis "Time (ms)" 0 --> 90
bar [57, 55, 80, 80, 83]
```
---
*Generated from Pi Calculation Benchmark - 5 decimals precision*
+54
View File
@@ -0,0 +1,54 @@
# 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*