diff --git a/README.md b/README.md index c3831b3..50d0afd 100644 --- a/README.md +++ b/README.md @@ -53,15 +53,15 @@ xychart-beta title "Compiled Languages - Time (ms) at 100 decimals" x-axis ["Assembly", "C", "C++", "Rust", "Go", "Nim", "Odin", "Fortran", "Swift", "Crystal"] y-axis "Time (ms)" 0 --> 35 - [9000000, 9000000, 9000000, 9000000, 9000000, 9000000, 9000000, 27000000, 29000000, 28000000] + bar [9, 9, 9, 9, 9, 9, 9, 27, 29, 28] ``` ```mermaid xychart-beta title "Compiled Languages - Memory Usage (MB) at 100 decimals" x-axis ["Assembly", "C", "C++", "Rust", "Go", "Nim", "Odin", "Fortran", "Swift", "Crystal"] - y-axis "Memory (bytes)" 0 --> 100 - [0, 0, 0, 0, 0, 0, 0, 0, 0, 0] + y-axis "Memory (MB)" 0 --> 1 + bar [0, 0, 0, 0, 0, 0, 0, 0, 0, 0] ``` #### JIT-Compiled Languages @@ -71,15 +71,15 @@ xychart-beta title "JIT-Compiled Languages - Time (ms) at 100 decimals" x-axis ["Java", "C#", "Kotlin", "Julia"] y-axis "Time (ms)" 0 --> 300 - [57000000, 57000000, 83000000, 290000000] + bar [57, 57, 83, 290] ``` ```mermaid xychart-beta title "JIT-Compiled Languages - Memory Usage (MB) at 100 decimals" x-axis ["Java", "C#", "Kotlin", "Julia"] - y-axis "Memory (bytes)" 0 --> 3000000 - [2000000, 2000000, 2000000, 2000000] + y-axis "Memory (MB)" 0 --> 3 + bar [2, 2, 2, 2] ``` #### Interpreted Languages @@ -89,15 +89,15 @@ xychart-beta title "Interpreted Languages - Time (ms) at 100 decimals" x-axis ["Python", "Perl", "PHP", "Ruby", "JavaScript"] y-axis "Time (ms)" 0 --> 90 - [57000000, 55000000, 77000000, 79000000, 84000000] + bar [57, 55, 77, 79, 84] ``` ```mermaid xychart-beta title "Interpreted Languages - Memory Usage (MB) at 100 decimals" x-axis ["Python", "Perl", "PHP", "Ruby", "JavaScript"] - y-axis "Memory (bytes)" 0 --> 3000000 - [2000000, 2000000, 2000000, 2000000, 2000000] + y-axis "Memory (MB)" 0 --> 3 + bar [2, 2, 2, 2, 2] ``` #### Slowest Languages @@ -107,7 +107,7 @@ xychart-beta title "Slowest Languages - Time (ms) at 100 decimals" x-axis ["Erlang", "R", "Elixir", "Scala", "TypeScript"] y-axis "Time (ms)" 0 --> 900 - [130000000, 349000000, 898000000, 58000000, 154000000] + bar [130, 349, 898, 58, 154] ``` ### Performance Scaling by Decimal Count @@ -120,7 +120,7 @@ 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 - [10000000, 10000000, 9000000, 9000000, 9000000, 9000000, 9000000, 28000000, 29000000, 28000000] + bar [10, 10, 9, 9, 9, 9, 9, 28, 29, 28] ``` **JIT-Compiled Languages:** @@ -129,7 +129,7 @@ xychart-beta title "JIT-Compiled Languages - Time (ms) at 1 decimal" x-axis ["Java", "C#", "Kotlin", "Julia"] y-axis "Time (ms)" 0 --> 300 - [57000000, 58000000, 83000000, 297000000] + bar [57, 58, 83, 297] ``` **Interpreted Languages:** @@ -138,7 +138,7 @@ xychart-beta title "Interpreted Languages - Time (ms) at 1 decimal" x-axis ["Python", "Perl", "PHP", "Ruby", "JavaScript"] y-axis "Time (ms)" 0 --> 90 - [57000000, 54000000, 78000000, 79000000, 82000000] + bar [57, 54, 78, 79, 82] ``` #### 2 Decimals @@ -149,7 +149,7 @@ 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 - [9000000, 9000000, 9000000, 9000000, 9000000, 9000000, 9000000, 26000000, 29000000, 28000000] + bar [9, 9, 9, 9, 9, 9, 9, 26, 29, 28] ``` **JIT-Compiled Languages:** @@ -158,7 +158,7 @@ xychart-beta title "JIT-Compiled Languages - Time (ms) at 2 decimals" x-axis ["Java", "C#", "Kotlin", "Julia"] y-axis "Time (ms)" 0 --> 300 - [57000000, 57000000, 83000000, 294000000] + bar [57, 57, 83, 294] ``` **Interpreted Languages:** @@ -167,7 +167,7 @@ xychart-beta title "Interpreted Languages - Time (ms) at 2 decimals" x-axis ["Python", "Perl", "PHP", "Ruby", "JavaScript"] y-axis "Time (ms)" 0 --> 90 - [57000000, 53000000, 79000000, 80000000, 83000000] + bar [57, 53, 79, 80, 83] ``` #### 5 Decimals @@ -178,7 +178,7 @@ 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 - [8000000, 10000000, 9000000, 9000000, 9000000, 9000000, 9000000, 15000000, 28000000, 28000000] + bar [8, 10, 9, 9, 9, 9, 9, 15, 28, 28] ``` **JIT-Compiled Languages:** @@ -187,7 +187,7 @@ xychart-beta title "JIT-Compiled Languages - Time (ms) at 5 decimals" x-axis ["Java", "C#", "Kotlin", "Julia"] y-axis "Time (ms)" 0 --> 300 - [57000000, 57000000, 83000000, 292000000] + bar [57, 57, 83, 292] ``` **Interpreted Languages:** @@ -196,7 +196,7 @@ xychart-beta title "Interpreted Languages - Time (ms) at 5 decimals" x-axis ["Python", "Perl", "PHP", "Ruby", "JavaScript"] y-axis "Time (ms)" 0 --> 90 - [57000000, 55000000, 80000000, 80000000, 83000000] + bar [57, 55, 80, 80, 83] ``` #### 10 Decimals @@ -207,7 +207,7 @@ 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 - [9000000, 9000000, 9000000, 9000000, 9000000, 9000000, 9000000, 21000000, 29000000, 29000000] + bar [9, 9, 9, 9, 9, 9, 9, 21, 29, 29] ``` **JIT-Compiled Languages:** @@ -216,7 +216,7 @@ xychart-beta title "JIT-Compiled Languages - Time (ms) at 10 decimals" x-axis ["Java", "C#", "Kotlin", "Julia"] y-axis "Time (ms)" 0 --> 310 - [58000000, 58000000, 83000000, 302000000] + bar [58, 58, 83, 302] ``` **Interpreted Languages:** @@ -225,7 +225,7 @@ xychart-beta title "Interpreted Languages - Time (ms) at 10 decimals" x-axis ["Python", "Perl", "PHP", "Ruby", "JavaScript"] y-axis "Time (ms)" 0 --> 90 - [57000000, 54000000, 78000000, 79000000, 83000000] + bar [57, 54, 78, 79, 83] ``` #### 1000 Decimals @@ -236,7 +236,7 @@ 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 - [9000000, 9000000, 30000000, 9000000, 9000000, 9000000, 9000000, 31000000, 29000000, 29000000] + bar [9, 9, 30, 9, 9, 9, 9, 31, 29, 29] ``` **JIT-Compiled Languages:** @@ -245,7 +245,7 @@ xychart-beta title "JIT-Compiled Languages - Time (ms) at 1000 decimals" x-axis ["Java", "C#", "Kotlin", "Julia"] y-axis "Time (ms)" 0 --> 310 - [57000000, 57000000, 83000000, 299000000] + bar [57, 57, 83, 299] ``` **Interpreted Languages:** @@ -254,7 +254,7 @@ xychart-beta title "Interpreted Languages - Time (ms) at 1000 decimals" x-axis ["Python", "Perl", "PHP", "Ruby", "JavaScript"] y-axis "Time (ms)" 0 --> 240 - [60000000, 103000000, 79000000, 79000000, 233000000] + bar [60, 103, 79, 79, 233] ``` #### 2000 Decimals @@ -265,7 +265,7 @@ 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 - [9000000, 27000000, 33000000, 9000000, 9000000, 9000000, 9000000, 31000000, 29000000, 29000000] + bar [9, 27, 33, 9, 9, 9, 9, 31, 29, 29] ``` **JIT-Compiled Languages:** @@ -274,7 +274,7 @@ xychart-beta title "JIT-Compiled Languages - Time (ms) at 2000 decimals" x-axis ["Java", "C#", "Kotlin", "Julia"] y-axis "Time (ms)" 0 --> 310 - [57000000, 57000000, 83000000, 299000000] + bar [57, 57, 83, 299] ``` **Interpreted Languages:** @@ -283,7 +283,7 @@ xychart-beta title "Interpreted Languages - Time (ms) at 2000 decimals" x-axis ["Python", "Perl", "PHP", "Ruby", "JavaScript"] y-axis "Time (ms)" 0 --> 240 - [60000000, 103000000, 79000000, 79000000, 233000000] + bar [60, 103, 79, 79, 233] ``` ### Resource Usage Over Time @@ -298,8 +298,8 @@ The following charts show memory usage throughout the program's entire lifetime. xychart-beta title "C - Memory Usage Over Time" x-axis "Time (ms)" 0 --> 12 - y-axis "Memory (bytes)" 0 --> 100 - [0] + y-axis "Memory (MB)" 0 --> 1 + line [0.0] ``` **Analysis:** C uses practically no memory and executes in 11ms. Memory remains stable at 0 MB throughout execution. @@ -310,8 +310,8 @@ xychart-beta xychart-beta title "Rust - Memory Usage Over Time" x-axis "Time (ms)" 0 --> 12 - y-axis "Memory (bytes)" 0 --> 100 - [0] + y-axis "Memory (MB)" 0 --> 1 + line [0.0] ``` **Analysis:** Rust matches C in performance and memory usage. Zero-cost abstractions provide optimal performance. @@ -322,8 +322,8 @@ xychart-beta xychart-beta title "Assembly - Memory Usage Over Time" x-axis "Time (ms)" 0 --> 20 - y-axis "Memory (bytes)" 0 --> 100 - [0] + y-axis "Memory (MB)" 0 --> 1 + line [0.0] ``` **Analysis:** Assembly shows similar performance to C and Rust with minimal memory. @@ -334,8 +334,8 @@ xychart-beta xychart-beta title "Haskell - Memory Usage Over Time" x-axis "Time (ms)" 0 --> 8 - y-axis "Memory (bytes)" 0 --> 12000000 - [10500000] + y-axis "Memory (MB)" 0 --> 12 + line [10.5] ``` **Analysis:** Haskell is fast (49ms) but uses significantly more memory (10.5 MB) due to runtime and garbage collector. @@ -346,8 +346,8 @@ xychart-beta xychart-beta title "Dart - Memory Usage Over Time" x-axis "Time (ms)" 0 --> 12 - y-axis "Memory (bytes)" 0 --> 11000000 - [9100000] + y-axis "Memory (MB)" 0 --> 11 + line [9.1] ``` **Analysis:** Dart shows higher memory usage (9.1 MB) but maintains good performance thanks to JIT compilation. @@ -360,8 +360,8 @@ xychart-beta xychart-beta title "Elixir - Memory Usage Over Time" x-axis "Time (ms)" 0 --> 300 - y-axis "Memory (bytes)" 0 --> 3000000 - [2000000, 2000000, 2000000, 2000000, 2000000, 2000000, 2000000, 2000000, 2000000, 2000000, 2000000, 2000000, 2000000] + 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] ``` **Analysis:** Elixir is slower (338ms) but shows very stable memory usage at 2 MB throughout execution. The BEAM VM provides predictable memory usage. @@ -372,8 +372,8 @@ xychart-beta xychart-beta title "TypeScript - Memory Usage Over Time" x-axis "Time (ms)" 0 --> 1500 - y-axis "Memory (bytes)" 0 --> 3000000 - [1900000, 2000000, 2000000, 2000000, 2000000, 2000000, 2000000, 2000000, 2000000, 2000000, 2000000, 2000000, 2000000, 2000000, 2000000, 2000000, 2000000, 2000000, 2000000, 2000000, 2000000, 2000000, 2000000, 2000000, 2000000, 2000000, 2000000] + y-axis "Memory (MB)" 0 --> 3 + 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, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0] ``` **Analysis:** TypeScript is slowest (1780ms) but shows an interesting memory profile: starts lower (1.9 MB) and quickly stabilizes at 2 MB. @@ -384,8 +384,8 @@ xychart-beta xychart-beta title "Scala - Memory Usage Over Time" x-axis "Time (ms)" 0 --> 360 - y-axis "Memory (bytes)" 0 --> 3000000 - [2000000, 2000000, 2000000, 2000000, 2000000, 2000000, 2000000, 2000000, 2000000, 2000000, 2000000, 2000000, 2000000, 2000000, 2000000] + 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] ``` **Analysis:** Scala on JVM shows stable memory usage but slower execution due to JVM startup time. @@ -396,8 +396,8 @@ xychart-beta xychart-beta title "JavaScript - Memory Usage Over Time" x-axis "Time (ms)" 0 --> 500 - y-axis "Memory (bytes)" 0 --> 3000000 - [2000000, 2000000, 2000000, 2000000, 2000000, 2000000, 2000000, 2000000, 2000000, 2000000, 2000000, 2000000, 2000000, 2000000, 2000000, 2000000, 2000000, 2000000, 2000000, 2000000, 2000000, 0] + 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, 2.0, 0.0] ``` **Analysis:** JavaScript shows stable memory usage but with an interesting drop at the end (0 MB) when the process terminates. @@ -410,8 +410,8 @@ xychart-beta xychart-beta title "Fast Languages - Memory Usage Comparison" x-axis ["C", "Rust", "Assembly", "Go", "Nim", "Odin", "C++", "Fortran", "Swift", "Haskell", "Dart"] - y-axis "Memory (bytes)" 0 --> 12000000 - [0, 0, 0, 0, 0, 0, 0, 1000000, 0, 10500000, 9100000] + y-axis "Memory (MB)" 0 --> 12 + bar [0, 0, 0, 0, 0, 0, 0, 1, 0, 10.5, 9.1] ``` **Analysis:** Most fast languages use minimal memory (0-1 MB), but Haskell and Dart stand out with 9-11 MB due to their runtime environments. @@ -422,8 +422,8 @@ xychart-beta xychart-beta title "Slow Languages - Memory Usage Comparison" x-axis ["Elixir", "Erlang", "R", "Scala", "TypeScript"] - y-axis "Memory (bytes)" 0 --> 3000000 - [2000000, 2000000, 2000000, 2000000, 2000000] + y-axis "Memory (MB)" 0 --> 3 + bar [2.0, 2.0, 2.0, 2.0, 2.0] ``` **Analysis:** All slow languages show similar memory usage (2 MB), suggesting that execution time doesn't directly correlate with memory usage. @@ -477,7 +477,7 @@ The following tables show how performance scales with increasing decimal precisi #### 1 Decimal -| Language | Time (ms) | Memory (bytes) | Status | +| Language | Time (ms) | Memory (MB) | Status | |----------|-----------|-------------|--------| | Assembly | 10 | 0 | ✓ | | C | 10 | 0 | ✓ | @@ -514,7 +514,7 @@ The following tables show how performance scales with increasing decimal precisi #### 2 Decimals -| Language | Time (ms) | Memory (bytes) | Status | +| Language | Time (ms) | Memory (MB) | Status | |----------|-----------|-------------|--------| | Assembly | 9 | 0 | ✓ | | C | 9 | 0 | ✓ | @@ -551,7 +551,7 @@ The following tables show how performance scales with increasing decimal precisi #### 5 Decimals -| Language | Time (ms) | Memory (bytes) | Status | +| Language | Time (ms) | Memory (MB) | Status | |----------|-----------|-------------|--------| | Assembly | 8 | 0 | ✓ | | C | 10 | 0 | ✓ | @@ -588,7 +588,7 @@ The following tables show how performance scales with increasing decimal precisi #### 10 Decimals -| Language | Time (ms) | Memory (bytes) | Status | +| Language | Time (ms) | Memory (MB) | Status | |----------|-----------|-------------|--------| | Assembly | 9 | 0 | ✓ | | C | 9 | 0 | ✓ | @@ -625,7 +625,7 @@ The following tables show how performance scales with increasing decimal precisi #### 100 Decimals -| Language | Time (ms) | Memory (bytes) | Status | +| Language | Time (ms) | Memory (MB) | Status | |----------|-----------|-------------|--------| | Assembly | 9 | 0 | ✓ | | C | 9 | 0 | ✓ | @@ -662,7 +662,7 @@ The following tables show how performance scales with increasing decimal precisi #### 1000 Decimals -| Language | Time (ms) | Memory (bytes) | Status | +| Language | Time (ms) | Memory (MB) | Status | |----------|-----------|-------------|--------| | Assembly | 9 | 0 | ✓ | | C | 9 | 0 | ✓ | @@ -699,7 +699,7 @@ The following tables show how performance scales with increasing decimal precisi #### 2000 Decimals -| Language | Time (ms) | Memory (bytes) | Status | +| Language | Time (ms) | Memory (MB) | Status | |----------|-----------|-------------|--------| | Assembly | 9 | 0 | ✓ | | C | 27 | 0 | ✓ |