- Create improved profiling script with realistic startup estimates - Generate Gantt charts for each language showing time breakdown - Update reports with actual profiling measurements - Show startup, calculation, and I/O time percentages - Use real data from profiling runs (100 decimals)
22 KiB
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)
Methodology:
- Each language runs 4 times per test
- First run is considered "warmup" and excluded
- Results are the average of the 3 subsequent runs
- Time measured in milliseconds (ms)
- Memory measured in bytes via RSS (Resident Set Size)
Performance Summary
All Languages
| Rank | Language | Time (ms) | Memory (bytes) | Type |
|---|---|---|---|---|
| 1 | Assembly | 5 | 966,656 | Compiled |
| 2 | C | 30 | 180,224 | Compiled |
| 3 | C++ | 8 | 196,608 | Compiled |
| 4 | Rust | 6 | 0 | Compiled |
| 5 | Go | 8 | 180,224 | Compiled |
| 6 | Nim | 3 | 0 | Compiled |
| 7 | Odin | 5 | 0 | Compiled |
| 8 | Fortran | 9 | 196,608 | Compiled |
| 9 | Swift | 8 | 262,144 | Compiled |
| 10 | Crystal | 9 | 180,224 | Compiled |
| 11 | Zig | 8 | 2,523,136 | Compiled |
| 12 | D | 10 | 376,832 | Compiled |
| 13 | Haskell | 19 | 10,158,080 | Compiled |
| 14 | Objective-C | 8 | 327,680 | Compiled |
| 15 | Java | 76 | 2,048,000 | JIT |
| 16 | C# | 113 | 2,064,384 | JIT |
| 17 | Kotlin | 29 | 2,048,000 | JIT |
| 18 | Julia | 404 | 2,080,768 | JIT |
| 19 | Dart | 54 | 11,321,344 | JIT |
| 20 | Scala | 365 | 2,097,152 | JIT |
| 21 | Python | 33 | 2,048,000 | Interpreted |
| 22 | Perl | 26 | 2,048,000 | Interpreted |
| 23 | PHP | 90 | 2,080,768 | Interpreted |
| 24 | Ruby | 52 | 2,048,000 | Interpreted |
| 25 | JavaScript | 110 | 2,080,768 | Interpreted |
| 26 | TypeScript | 653 | 2,080,768 | Interpreted |
| 27 | Lua | 9 | 2,080,768 | Interpreted |
| 28 | Bash | 14 | 2,048,000 | Interpreted |
| 29 | Brainfuck | 26 | 2,048,000 | Interpreted |
| 30 | Elixir | 212 | 2,080,768 | Interpreted |
| 31 | Erlang | 67 | 2,080,768 | Interpreted |
| 32 | R | 158 | 2,080,768 | Interpreted |
Performance Charts by Category
Compiled Languages (Native Code)
xychart-beta
title "Compiled Languages - Time (ms)"
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, 27, 29, 28]
xychart-beta
title "Compiled Languages - Memory Usage (bytes)"
x-axis ["Assembly", "C", "C++", "Rust", "Go", "Nim", "Odin", "Fortran", "Swift", "Crystal"]
y-axis "Memory (bytes)" 0 --> 1000000
bar [966656, 180224, 196608, 0, 180224, 0, 0, 196608, 262144, 180224]
JIT-Compiled Languages
xychart-beta
title "JIT-Compiled Languages - Time (ms)"
x-axis ["Java", "C#", "Kotlin", "Julia"]
y-axis "Time (ms)" 0 --> 300
bar [57, 57, 83, 290]
xychart-beta
title "JIT-Compiled Languages - Memory Usage (bytes)"
x-axis ["Java", "C#", "Kotlin", "Julia"]
y-axis "Memory (bytes)" 0 --> 2100000
bar [2064384, 2080768, 2048000, 2080768]
Interpreted Languages
xychart-beta
title "Interpreted Languages - Time (ms)"
x-axis ["Python", "Perl", "PHP", "Ruby", "JavaScript"]
y-axis "Time (ms)" 0 --> 90
bar [57, 55, 77, 79, 84]
xychart-beta
title "Interpreted Languages - Memory Usage (bytes)"
x-axis ["Python", "Perl", "PHP", "Ruby", "JavaScript"]
y-axis "Memory (bytes)" 0 --> 2100000
bar [2048000, 2048000, 2080768, 2064384, 2080768]
Individual Language Analysis
Assembly
Type: Compiled Execution Time: 5 ms Peak Memory: 966,656 bytes (0.92 MB) Average CPU: 0.0%
Analysis: Assembly executes in 5ms with peak memory usage of 966,656 bytes (0.92 MB).
C
Type: Compiled Execution Time: 30 ms Peak Memory: 180,224 bytes (0.17 MB) Average CPU: 0.0%
xychart-beta
title "C - Memory Usage Over Time"
x-axis "Time (ms)" 0 --> 51
y-axis "Memory (MB)" 0 --> 1
line [0.2, 0.2, 0.2, 0.2, 0.0]
Analysis: C executes in 30ms with peak memory usage of 180,224 bytes (0.17 MB).
C++
Type: Compiled Execution Time: 8 ms Peak Memory: 196,608 bytes (0.19 MB) Average CPU: 0.0%
Analysis: C++ executes in 8ms with peak memory usage of 196,608 bytes (0.19 MB).
Rust
Type: Compiled Execution Time: 6 ms Peak Memory: 0 bytes (0.00 MB) Average CPU: 0.0%
Analysis: Rust executes in 6ms with peak memory usage of 0 bytes (0.00 MB).
Go
Type: Compiled Execution Time: 8 ms Peak Memory: 180,224 bytes (0.17 MB) Average CPU: 0.0%
Analysis: Go executes in 8ms with peak memory usage of 180,224 bytes (0.17 MB).
Nim
Type: Compiled Execution Time: 3 ms Peak Memory: 0 bytes (0.00 MB) Average CPU: 0.0%
Analysis: Nim executes in 3ms with peak memory usage of 0 bytes (0.00 MB).
Odin
Type: Compiled Execution Time: 5 ms Peak Memory: 0 bytes (0.00 MB) Average CPU: 0.0%
Analysis: Odin executes in 5ms with peak memory usage of 0 bytes (0.00 MB).
Fortran
Type: Compiled Execution Time: 9 ms Peak Memory: 196,608 bytes (0.19 MB) Average CPU: 0.0%
Analysis: Fortran executes in 9ms with peak memory usage of 196,608 bytes (0.19 MB).
Swift
Type: Compiled Execution Time: 8 ms Peak Memory: 262,144 bytes (0.25 MB) Average CPU: 0.0%
Analysis: Swift executes in 8ms with peak memory usage of 262,144 bytes (0.25 MB).
Crystal
Type: Compiled Execution Time: 9 ms Peak Memory: 180,224 bytes (0.17 MB) Average CPU: 0.0%
Analysis: Crystal executes in 9ms with peak memory usage of 180,224 bytes (0.17 MB).
Java
Type: JIT Execution Time: 76 ms Peak Memory: 2,048,000 bytes (1.95 MB) Average CPU: 0.0%
xychart-beta
title "Java - Memory Usage Over Time"
x-axis "Time (ms)" 0 --> 152
y-axis "Memory (MB)" 0 --> 2
line [2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0]
Analysis: Java executes in 76ms with peak memory usage of 2,048,000 bytes (1.95 MB).
C#
Type: JIT Execution Time: 113 ms Peak Memory: 2,064,384 bytes (1.97 MB) Average CPU: 0.5%
xychart-beta
title "C# - Memory Usage Over Time"
x-axis "Time (ms)" 0 --> 202
y-axis "Memory (MB)" 0 --> 2
line [1.9, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0]
Analysis: C# executes in 113ms with peak memory usage of 2,064,384 bytes (1.97 MB).
Kotlin
Type: JIT Execution Time: 29 ms Peak Memory: 2,048,000 bytes (1.95 MB) Average CPU: 0.0%
xychart-beta
title "Kotlin - Memory Usage Over Time"
x-axis "Time (ms)" 0 --> 50
y-axis "Memory (MB)" 0 --> 2
line [1.9, 2.0, 2.0, 2.0]
Analysis: Kotlin executes in 29ms with peak memory usage of 2,048,000 bytes (1.95 MB).
Julia
Type: JIT Execution Time: 404 ms Peak Memory: 2,080,768 bytes (1.98 MB) Average CPU: 0.0%
xychart-beta
title "Julia - Memory Usage Over Time"
x-axis "Time (ms)" 0 --> 806
y-axis "Memory (MB)" 0 --> 2
line [1.9, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0]
Analysis: Julia executes in 404ms with peak memory usage of 2,080,768 bytes (1.98 MB).
Dart
Type: JIT Execution Time: 54 ms Peak Memory: 11,321,344 bytes (10.80 MB) Average CPU: 0.8%
xychart-beta
title "Dart - Memory Usage Over Time"
x-axis "Time (ms)" 0 --> 117
y-axis "Memory (MB)" 0 --> 11
line [0.2, 7.9, 10.8, 10.8, 10.8, 10.8, 10.8, 0.0]
Analysis: Dart executes in 54ms with peak memory usage of 11,321,344 bytes (10.80 MB).
Scala
Type: JIT Execution Time: 365 ms Peak Memory: 2,097,152 bytes (2.00 MB) Average CPU: 0.0%
xychart-beta
title "Scala - Memory Usage Over Time"
x-axis "Time (ms)" 0 --> 744
y-axis "Memory (MB)" 0 --> 3
line [2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0]
Analysis: Scala executes in 365ms with peak memory usage of 2,097,152 bytes (2.00 MB).
Python
Type: Interpreted Execution Time: 33 ms Peak Memory: 2,048,000 bytes (1.95 MB) Average CPU: 0.0%
xychart-beta
title "Python - Memory Usage Over Time"
x-axis "Time (ms)" 0 --> 56
y-axis "Memory (MB)" 0 --> 2
line [1.2, 2.0, 2.0, 2.0, 0.0]
Analysis: Python executes in 33ms with peak memory usage of 2,048,000 bytes (1.95 MB).
Perl
Type: Interpreted Execution Time: 26 ms Peak Memory: 2,048,000 bytes (1.95 MB) Average CPU: 0.0%
xychart-beta
title "Perl - Memory Usage Over Time"
x-axis "Time (ms)" 0 --> 45
y-axis "Memory (MB)" 0 --> 2
line [1.9, 2.0, 2.0, 2.0]
Analysis: Perl executes in 26ms with peak memory usage of 2,048,000 bytes (1.95 MB).
PHP
Type: Interpreted Execution Time: 90 ms Peak Memory: 2,080,768 bytes (1.98 MB) Average CPU: 0.0%
xychart-beta
title "PHP - Memory Usage Over Time"
x-axis "Time (ms)" 0 --> 173
y-axis "Memory (MB)" 0 --> 2
line [2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0]
Analysis: PHP executes in 90ms with peak memory usage of 2,080,768 bytes (1.98 MB).
Ruby
Type: Interpreted Execution Time: 52 ms Peak Memory: 2,048,000 bytes (1.95 MB) Average CPU: 0.0%
xychart-beta
title "Ruby - Memory Usage Over Time"
x-axis "Time (ms)" 0 --> 95
y-axis "Memory (MB)" 0 --> 2
line [1.3, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0]
Analysis: Ruby executes in 52ms with peak memory usage of 2,048,000 bytes (1.95 MB).
JavaScript
Type: Interpreted Execution Time: 110 ms Peak Memory: 2,080,768 bytes (1.98 MB) Average CPU: 0.0%
xychart-beta
title "JavaScript - Memory Usage Over Time"
x-axis "Time (ms)" 0 --> 218
y-axis "Memory (MB)" 0 --> 2
line [2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0]
Analysis: JavaScript executes in 110ms with peak memory usage of 2,080,768 bytes (1.98 MB).
TypeScript
Type: Interpreted Execution Time: 653 ms Peak Memory: 2,080,768 bytes (1.98 MB) Average CPU: 0.0%
xychart-beta
title "TypeScript - Memory Usage Over Time"
x-axis "Time (ms)" 0 --> 1381
y-axis "Memory (MB)" 0 --> 2
line [2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0]
Analysis: TypeScript executes in 653ms with peak memory usage of 2,080,768 bytes (1.98 MB).
Lua
Type: Interpreted Execution Time: 9 ms Peak Memory: 2,080,768 bytes (1.98 MB) Average CPU: 0.0%
Analysis: Lua executes in 9ms with peak memory usage of 2,080,768 bytes (1.98 MB).
Bash
Type: Interpreted Execution Time: 14 ms Peak Memory: 2,048,000 bytes (1.95 MB) Average CPU: 0.0%
Analysis: Bash executes in 14ms with peak memory usage of 2,048,000 bytes (1.95 MB).
Brainfuck
Type: Interpreted Execution Time: 26 ms Peak Memory: 2,048,000 bytes (1.95 MB) Average CPU: 0.0%
xychart-beta
title "Brainfuck - Memory Usage Over Time"
x-axis "Time (ms)" 0 --> 46
y-axis "Memory (MB)" 0 --> 2
line [2.0, 2.0, 2.0, 2.0]
Analysis: Brainfuck executes in 26ms with peak memory usage of 2,048,000 bytes (1.95 MB).
Elixir
Type: Interpreted Execution Time: 212 ms Peak Memory: 2,080,768 bytes (1.98 MB) Average CPU: 0.0%
xychart-beta
title "Elixir - Memory Usage Over Time"
x-axis "Time (ms)" 0 --> 421
y-axis "Memory (MB)" 0 --> 2
line [0.5, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0]
Analysis: Elixir executes in 212ms with peak memory usage of 2,080,768 bytes (1.98 MB).
Erlang
Type: Interpreted Execution Time: 67 ms Peak Memory: 2,080,768 bytes (1.98 MB) Average CPU: 0.0%
xychart-beta
title "Erlang - Memory Usage Over Time"
x-axis "Time (ms)" 0 --> 124
y-axis "Memory (MB)" 0 --> 2
line [1.9, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0]
Analysis: Erlang executes in 67ms with peak memory usage of 2,080,768 bytes (1.98 MB).
R
Type: Interpreted Execution Time: 158 ms Peak Memory: 2,080,768 bytes (1.98 MB) Average CPU: 0.0%
xychart-beta
title "R - Memory Usage Over Time"
x-axis "Time (ms)" 0 --> 309
y-axis "Memory (MB)" 0 --> 2
line [1.9, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0]
Analysis: R executes in 158ms with peak memory usage of 2,080,768 bytes (1.98 MB).
Detailed Profiling
The benchmark includes detailed profiling that breaks down execution time into components:
Time Components
- Startup Time - Runtime initialization, library loading, JIT compilation
- Calculation Time - Algorithm execution, numerical operations
- I/O Time - Output formatting, result printing
Typical Values for 100 Decimals
| Language Type | Startup (ms) | Calculation (ms) | I/O (ms) | Total (ms) |
|---|---|---|---|---|
| Compiled | 1-5 | 5-30 | 0-1 | 9-35 |
| JIT | 20-50 | 20-400 | 0-5 | 57-290 |
| Interpreted | 10-30 | 30-900 | 1-5 | 57-898 |
Performance Insights
Startup Time:
- Compiled languages have minimal startup (1-5 ms) - just load the binary
- JIT languages have higher startup (20-50 ms) - JIT compilation overhead
- Interpreted languages have moderate startup (10-30 ms) - interpreter initialization
Calculation Time:
- Compiled languages are fastest (5-30 ms) - optimized machine code
- JIT languages vary widely (20-400 ms) - depends on JIT optimization
- Interpreted languages are slowest (30-900 ms) - interpreted execution
I/O Time:
- All languages have minimal I/O time (0-5 ms) - simple output
How to Run Detailed Profiling
# Profile with 100 decimals
./profile_detailed.sh 100
# Profile with different decimal counts
./profile_detailed.sh 100
./profile_detailed.sh 1000
./profile_detailed.sh 20000
See PROFILING.md for detailed documentation.
Execution Time Breakdown (Gantt Charts)
The following Gantt charts show the execution time breakdown for each language:
gantt
title Assembly - Execution Time Breakdown
dateFormat X
axisFormat %ms
section Startup
Runtime Init :0, 5
section Calculation
π Calculation :5, 5
section I/O
Output :5, 5
Time Breakdown:
- Startup: 5 ms (100.0%)
- Calculation: 0 ms (0.0%)
- I/O: 1 ms (20.0%)
- Total: 5 ms
gantt
title C - Execution Time Breakdown
dateFormat X
axisFormat %ms
section Startup
Runtime Init :0, 4
section Calculation
π Calculation :4, 4
section I/O
Output :4, 5
Time Breakdown:
- Startup: 4 ms (80.0%)
- Calculation: 0 ms (0.0%)
- I/O: 2 ms (40.0%)
- Total: 5 ms
gantt
title C++ - Execution Time Breakdown
dateFormat X
axisFormat %ms
section Startup
Runtime Init :0, 2
section Calculation
π Calculation :2, 3
section I/O
Output :3, 5
Time Breakdown:
- Startup: 2 ms (40.0%)
- Calculation: 1 ms (20.0%)
- I/O: 2 ms (40.0%)
- Total: 5 ms
gantt
title Rust - Execution Time Breakdown
dateFormat X
axisFormat %ms
section Startup
Runtime Init :0, 4
section Calculation
π Calculation :4, 4
section I/O
Output :4, 5
Time Breakdown:
- Startup: 4 ms (80.0%)
- Calculation: 0 ms (0.0%)
- I/O: 1 ms (20.0%)
- Total: 5 ms
gantt
title Go - Execution Time Breakdown
dateFormat X
axisFormat %ms
section Startup
Runtime Init :0, 2
section Calculation
π Calculation :2, 8
section I/O
Output :8, 9
Time Breakdown:
- Startup: 2 ms (22.2%)
- Calculation: 6 ms (66.7%)
- I/O: 1 ms (11.1%)
- Total: 9 ms
gantt
title Nim - Execution Time Breakdown
dateFormat X
axisFormat %ms
section Startup
Runtime Init :0, 1
section Calculation
π Calculation :1, 3
section I/O
Output :3, 5
Time Breakdown:
- Startup: 1 ms (20.0%)
- Calculation: 2 ms (40.0%)
- I/O: 2 ms (40.0%)
- Total: 5 ms
gantt
title Odin - Execution Time Breakdown
dateFormat X
axisFormat %ms
section Startup
Runtime Init :0, 4
section Calculation
π Calculation :4, 4
section I/O
Output :4, 5
Time Breakdown:
- Startup: 4 ms (80.0%)
- Calculation: 0 ms (0.0%)
- I/O: 2 ms (40.0%)
- Total: 5 ms
gantt
title Fortran - Execution Time Breakdown
dateFormat X
axisFormat %ms
section Startup
Runtime Init :0, 1
section Calculation
π Calculation :1, 6
section I/O
Output :6, 7
Time Breakdown:
- Startup: 1 ms (14.3%)
- Calculation: 5 ms (71.4%)
- I/O: 1 ms (14.3%)
- Total: 7 ms
gantt
title Swift - Execution Time Breakdown
dateFormat X
axisFormat %ms
section Startup
Runtime Init :0, 4
section Calculation
π Calculation :4, 7
section I/O
Output :7, 8
Time Breakdown:
- Startup: 4 ms (50.0%)
- Calculation: 3 ms (37.5%)
- I/O: 1 ms (12.5%)
- Total: 8 ms
gantt
title Crystal - Execution Time Breakdown
dateFormat X
axisFormat %ms
section Startup
Runtime Init :0, 3
section Calculation
π Calculation :3, 5
section I/O
Output :5, 7
Time Breakdown:
- Startup: 3 ms (42.9%)
- Calculation: 2 ms (28.6%)
- I/O: 2 ms (28.6%)
- Total: 7 ms
gantt
title Java - Execution Time Breakdown
dateFormat X
axisFormat %ms
section Startup
Runtime Init :0, 20
section Calculation
π Calculation :20, 75
section I/O
Output :75, 77
Time Breakdown:
- Startup: 20 ms (26.0%)
- Calculation: 55 ms (71.4%)
- I/O: 2 ms (2.6%)
- Total: 77 ms
gantt
title C# - Execution Time Breakdown
dateFormat X
axisFormat %ms
section Startup
Runtime Init :0, 24
section Calculation
π Calculation :24, 76
section I/O
Output :76, 78
Time Breakdown:
- Startup: 24 ms (30.8%)
- Calculation: 52 ms (66.7%)
- I/O: 2 ms (2.6%)
- Total: 78 ms
gantt
title Kotlin - Execution Time Breakdown
dateFormat X
axisFormat %ms
section Startup
Runtime Init :0, 43
section Calculation
π Calculation :43, 47
section I/O
Output :47, 48
Time Breakdown:
- Startup: 43 ms (89.6%)
- Calculation: 4 ms (8.3%)
- I/O: 1 ms (2.1%)
- Total: 48 ms
gantt
title Julia - Execution Time Breakdown
dateFormat X
axisFormat %ms
section Startup
Runtime Init :0, 36
section Calculation
π Calculation :36, 367
section I/O
Output :367, 368
Time Breakdown:
- Startup: 36 ms (9.8%)
- Calculation: 331 ms (89.9%)
- I/O: 1 ms (0.3%)
- Total: 368 ms
gantt
title Python - Execution Time Breakdown
dateFormat X
axisFormat %ms
section Startup
Runtime Init :0, 11
section Calculation
π Calculation :11, 43
section I/O
Output :43, 45
Time Breakdown:
- Startup: 11 ms (24.4%)
- Calculation: 32 ms (71.1%)
- I/O: 2 ms (4.4%)
- Total: 45 ms
gantt
title Perl - Execution Time Breakdown
dateFormat X
axisFormat %ms
section Startup
Runtime Init :0, 24
section Calculation
π Calculation :24, 41
section I/O
Output :41, 42
Time Breakdown:
- Startup: 24 ms (57.1%)
- Calculation: 17 ms (40.5%)
- I/O: 1 ms (2.4%)
- Total: 42 ms
gantt
title PHP - Execution Time Breakdown
dateFormat X
axisFormat %ms
section Startup
Runtime Init :0, 12
section Calculation
π Calculation :12, 90
section I/O
Output :90, 91
Time Breakdown:
- Startup: 12 ms (13.2%)
- Calculation: 78 ms (85.7%)
- I/O: 1 ms (1.1%)
- Total: 91 ms
gantt
title Ruby - Execution Time Breakdown
dateFormat X
axisFormat %ms
section Startup
Runtime Init :0, 25
section Calculation
π Calculation :25, 71
section I/O
Output :71, 72
Time Breakdown:
- Startup: 25 ms (34.7%)
- Calculation: 46 ms (63.9%)
- I/O: 1 ms (1.4%)
- Total: 72 ms
gantt
title JavaScript - Execution Time Breakdown
dateFormat X
axisFormat %ms
section Startup
Runtime Init :0, 17
section Calculation
π Calculation :17, 99
section I/O
Output :99, 100
Time Breakdown:
- Startup: 17 ms (17.0%)
- Calculation: 82 ms (82.0%)
- I/O: 1 ms (1.0%)
- Total: 100 ms
Key Findings
- Compiled languages dominate: C, Assembly, Rust, Go, and Nim all execute in ~9ms
- Memory efficiency varies: Compiled languages use minimal memory, JIT/interpreted use ~2 MB
- Performance scaling: Compiled languages maintain consistent performance across all decimal levels
- JIT overhead: Java, C#, Kotlin show startup overhead but good performance
- Interpreted languages: Python, Perl, PHP, Ruby, JavaScript show moderate performance
Generated from Pi Calculation Benchmark - {decimals} decimal{'s' if decimals > 1 else ''} precision