Java VS C# benchmarks

Current benchmark data was generated on Mon Dec 30 2024, full log can be found HERE

CONTRIBUTIONS are WELCOME!

[x86_64][4 cores] AMD EPYC 7763 64-Core Processor (Model 1)

* -m in a file name stands for multi-threading or multi-processing

* -i in a file name stands for direct intrinsics usage. (Usage of simd intrinsics via libraries is not counted)

* -ffi in a file name stands for non-stdlib FFI usage

* (You may find time < time(user) + time(sys) for some non-parallelized programs, the overhead is from GC or JIT compiler, which are allowed to take advantage of multi-cores as that's more close to real-world scenarios.)

binarytrees

Input: 18

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
java 2.java 470ms 5.2ms 643.8MB 573ms 93ms openjdk 23
java 2-m.java 503ms 33ms 647.1MB 723ms 113ms graal/jvm 17.0.8
java 2.java 523ms 24ms 572.1MB 573ms 123ms openjdk 21
csharp 1.cs 934ms 19ms 178.8MB 943ms 113ms dotnet/aot 9.0.101
csharp 1.cs 937ms 13ms 190.1MB 943ms 147ms dotnet 9.0.101
java 2.java 1179ms 21ms 1061.1MB 597ms 750ms openjdk/zgc 21
csharp 1.cs 1755ms 97ms 101.4MB 1977ms 223ms mono 6.12.0

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 1.cs 116ms 6.0ms 40.9MB 90ms 20ms dotnet/aot 9.0.101
java 2.java 121ms 3.7ms 167.1MB 147ms 33ms openjdk 21
java 2.java 127ms 6.0ms 98.3MB 160ms 30ms openjdk 23
csharp 1.cs 145ms 4.8ms 46.0MB 123ms 13ms mono 6.12.0
java 2-m.java 147ms 3.6ms 217.2MB 217ms 50ms graal/jvm 17.0.8
csharp 1.cs 202ms 19ms 61.8MB 153ms 33ms dotnet 9.0.101
java 2.java 308ms 0.7ms 241.5MB 150ms 210ms openjdk/zgc 21

edigits

Input: 250001

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
java 1-m.java 604ms 73ms 280.0MB 1673ms 77ms openjdk 21
java 1-m.java 623ms 17ms 357.7MB 1187ms 117ms graal/jvm 17.0.8
java 1-m.java 627ms 58ms 227.7MB 1667ms 57ms openjdk 23
java 1-m.java 986ms 3.5ms 524.1MB 1717ms 423ms openjdk/zgc 21
csharp 1.cs 4071ms 3.4ms 24.3MB 4037ms 20ms dotnet/aot 9.0.101
csharp 1.cs 4961ms 18ms 43.9MB 4927ms 20ms dotnet 9.0.101

Input: 100000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
java 1-m.java 299ms 20ms 231.8MB 577ms 77ms graal/jvm 17.0.8
java 1-m.java 334ms 14ms 178.4MB 907ms 50ms openjdk 21
java 1-m.java 365ms 5.6ms 111.1MB 990ms 57ms openjdk 23
java 1-m.java 510ms 18ms 215.0MB 1003ms 197ms openjdk/zgc 21
csharp 1.cs 677ms 3.5ms 20.4MB 660ms 7ms dotnet/aot 9.0.101
csharp 1.cs 867ms 0.8ms 40.1MB 840ms 20ms dotnet 9.0.101

fannkuch-redux

Input: 11

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
java 1-m.java 894ms 15ms 102.3MB 3283ms 30ms graal/jvm 17.0.8
java 1-m.java 971ms 10ms 48.5MB 3577ms 23ms openjdk 21
java 1-m.java 985ms 16ms 50.2MB 3623ms 20ms openjdk 23
java 1-m.java 1034ms 22ms 47.9MB 3397ms 137ms openjdk/zgc 21

Input: 10

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
java 1-m.java 175ms 5.5ms 48.4MB 480ms 17ms openjdk 21
java 1-m.java 195ms 6.3ms 50.2MB 507ms 27ms openjdk 23
java 1-m.java 200ms 6.1ms 101.9MB 547ms 43ms graal/jvm 17.0.8
java 1-m.java 293ms 7.1ms 45.7MB 477ms 133ms openjdk/zgc 21

fasta

Input: 2500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 5-m.cs 128ms 5.1ms 32.6MB 353ms 83ms dotnet/aot 9.0.101
csharp 5-m.cs 200ms 2.9ms 49.2MB 467ms 120ms dotnet 9.0.101
csharp 5-m.cs 254ms 11ms 60.7MB 697ms 107ms mono 6.12.0
java 4.java 451ms 5.2ms 47.6MB 530ms 20ms openjdk 21
java 4.java 454ms 3.6ms 49.0MB 547ms 10ms openjdk 23
java 4-m.java 463ms 14ms 105.1MB 660ms 40ms graal/jvm 17.0.8
java 4.java 563ms 2.0ms 46.9MB 530ms 133ms openjdk/zgc 21

Input: 250000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 5-m.cs 27ms 1.0ms 25.2MB 37ms 17ms dotnet/aot 9.0.101
csharp 5-m.cs 64ms 4.7ms 46.9MB 83ms 20ms dotnet 9.0.101
csharp 5-m.cs 72ms 4.0ms 42.9MB 103ms 23ms mono 6.12.0
java 4.java 125ms 0.4ms 46.8MB 163ms 17ms openjdk 21
java 4.java 125ms 0.6ms 47.6MB 173ms 10ms openjdk 23
java 4-m.java 132ms 11ms 97.1MB 180ms 37ms graal/jvm 17.0.8
java 4.java 238ms 8.8ms 43.8MB 153ms 140ms openjdk/zgc 21

helloworld

Input: QwQ

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 1.cs 11ms 8.6ms 15.6MB 0ms 0ms dotnet/aot 9.0.101
csharp 1.cs 30ms 0.6ms 21.9MB 16ms 2ms mono 6.12.0
csharp 1.cs 36ms 0.9ms 32.0MB 16ms 12ms dotnet 9.0.101
java 1.java 63ms 1.7ms 54.7MB 60ms 22ms graal/jvm 17.0.8
java 1.java 66ms 3.8ms 43.8MB 70ms 18ms openjdk 21
java 1.java 68ms 6.1ms 44.7MB 76ms 12ms openjdk 23
java 1.java 187ms 4.7ms 44.6MB 78ms 132ms openjdk/zgc 21

knucleotide

Input: 2500000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 6-m.cs 466ms 23ms 54.2MB 1217ms 27ms dotnet/aot 9.0.101
csharp 6-m.cs 788ms 24ms 77.0MB 2060ms 37ms dotnet 9.0.101
java 3-m.java 1002ms 40ms 131.5MB 3387ms 43ms openjdk 21
csharp 6-m.cs 1042ms 54ms 73.0MB 2940ms 27ms mono 6.12.0
java 3-m.java 1072ms 29ms 155.1MB 3667ms 53ms openjdk 23
java 3-m.java 1112ms 14ms 183.1MB 3793ms 47ms graal/jvm 17.0.8
java 3-m.java 1386ms 111ms 179.2MB 4340ms 200ms openjdk/zgc 21

Input: 250000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 6-m.cs 82ms 4.0ms 45.6MB 140ms 17ms dotnet/aot 9.0.101
csharp 6-m.cs 174ms 5.4ms 64.2MB 270ms 30ms dotnet 9.0.101
csharp 6-m.cs 194ms 1.5ms 50.7MB 380ms 13ms mono 6.12.0
java 3-m.java 325ms 15ms 102.1MB 927ms 50ms openjdk 21
java 3-m.java 334ms 17ms 141.9MB 880ms 47ms graal/jvm 17.0.8
java 3-m.java 359ms 20ms 87.1MB 1103ms 30ms openjdk 23
java 3-m.java 422ms 4.7ms 100.1MB 860ms 177ms openjdk/zgc 21

mandelbrot

Input: 5000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 2.cs 1109ms 65ms 46.0MB 1080ms 7ms dotnet 9.0.101
java 1b.java 1144ms 12ms 55.5MB 1240ms 20ms openjdk 23
java 1b.java 1168ms 23ms 54.2MB 1273ms 33ms openjdk 21
java 1b.java 1203ms 68ms 117.0MB 1440ms 40ms graal/jvm 17.0.8
java 1.java 1259ms 8.7ms 133.7MB 1377ms 43ms graal/jvm 17.0.8
java 1b.java 1263ms 2.1ms 52.3MB 1237ms 140ms openjdk/zgc 21
java 1a.java 1654ms 5.2ms 56.2MB 1760ms 17ms openjdk 23
java 1a.java 1654ms 6.3ms 54.9MB 1760ms 13ms openjdk 21
java 1a.java 1681ms 13ms 108.0MB 1797ms 33ms graal/jvm 17.0.8
java 1.java 1690ms 5.3ms 202.6MB 1757ms 40ms openjdk 21
java 1.java 1698ms 0.5ms 305.7MB 1767ms 40ms openjdk 23
java 1a.java 1769ms 2.8ms 51.8MB 1747ms 133ms openjdk/zgc 21
csharp 1.cs 2104ms 69ms 42.8MB 2070ms 7ms dotnet 9.0.101
java 1.java 2347ms 6.5ms 858.6MB 1793ms 657ms openjdk/zgc 21
csharp 3.cs 2455ms 20ms 42.8MB 2427ms 13ms dotnet 9.0.101
csharp 3.cs 2516ms 5.9ms 22.3MB 2500ms 0ms dotnet/aot 9.0.101
csharp 1.cs 3557ms 4.9ms 22.2MB 3540ms 3ms dotnet/aot 9.0.101
csharp 1.cs timeout 0.0ms 24.3MB 4980ms 3ms mono 6.12.0
java 2.java timeout 0.0ms 716.7MB 5293ms 133ms openjdk 21
java 2.java timeout 0.0ms 780.8MB 5253ms 133ms openjdk 23
java 2.java timeout 0.0ms 3336.6MB 3367ms 1973ms openjdk/zgc 21

Input: 1000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 3.cs 118ms 2.6ms 17.4MB 100ms 3ms dotnet/aot 9.0.101
csharp 2.cs 134ms 6.8ms 43.1MB 110ms 10ms dotnet 9.0.101
csharp 1.cs 137ms 2.6ms 39.7MB 117ms 3ms dotnet 9.0.101
csharp 1.cs 156ms 1.9ms 19.2MB 140ms 0ms dotnet/aot 9.0.101
csharp 3.cs 166ms 3.9ms 39.9MB 153ms 0ms dotnet 9.0.101
java 1b-m.java 185ms 12ms 50.8MB 293ms 17ms openjdk 23
java 1b-m.java 190ms 4.9ms 49.5MB 303ms 27ms openjdk 21
java 1-m.java 190ms 3.8ms 81.5MB 263ms 27ms openjdk 21
java 1a-m.java 190ms 2.7ms 52.4MB 290ms 13ms openjdk 23
java 1a-m.java 190ms 3.4ms 50.9MB 293ms 20ms openjdk 21
java 1-m.java 193ms 2.4ms 87.1MB 260ms 33ms openjdk 23
java 1a-m.java 203ms 0.9ms 102.9MB 307ms 33ms graal/jvm 17.0.8
java 1-m.java 206ms 13ms 113.4MB 313ms 43ms graal/jvm 17.0.8
java 1b-m.java 221ms 20ms 106.1MB 367ms 33ms graal/jvm 17.0.8
java 1b.java 305ms 1.8ms 47.7MB 277ms 153ms openjdk/zgc 21
java 1a.java 313ms 8.2ms 48.3MB 283ms 140ms openjdk/zgc 21
java 1.java 332ms 2.6ms 115.9MB 257ms 167ms openjdk/zgc 21
java 2-m.java 551ms 8.9ms 596.9MB 820ms 97ms openjdk 21
java 2-m.java 569ms 12ms 727.5MB 837ms 117ms openjdk 23
csharp 1.cs 573ms 11ms 23.4MB 550ms 7ms mono 6.12.0
java 2.java 1582ms 3.8ms 1350.2MB 830ms 1053ms openjdk/zgc 21

merkletrees

Input: 17

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
java 1.java 399ms 1.4ms 542.0MB 487ms 93ms openjdk 23
java 1.java 423ms 3.2ms 678.0MB 463ms 120ms openjdk 21
java 1-m.java 432ms 28ms 579.8MB 670ms 87ms graal/jvm 17.0.8
csharp 2.cs 540ms 2.8ms 123.4MB 457ms 110ms dotnet/aot 9.0.101
csharp 1.cs 592ms 9.8ms 152.5MB 530ms 120ms dotnet/aot 9.0.101
csharp 2.cs 680ms 21ms 142.0MB 610ms 117ms dotnet 9.0.101
csharp 1.cs 743ms 44ms 170.9MB 660ms 140ms dotnet 9.0.101
java 1.java 1051ms 32ms 963.0MB 460ms 717ms openjdk/zgc 21
csharp 1.cs 1301ms 44ms 146.2MB 1470ms 203ms mono 6.12.0

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 2.cs 135ms 1.9ms 64.9MB 100ms 37ms dotnet/aot 9.0.101
csharp 1.cs 154ms 4.0ms 78.9MB 110ms 57ms dotnet/aot 9.0.101
java 1-m.java 161ms 1.6ms 206.3MB 240ms 30ms openjdk 21
java 1-m.java 162ms 2.8ms 158.4MB 233ms 40ms openjdk 23
java 1-m.java 233ms 27ms 259.4MB 393ms 53ms graal/jvm 17.0.8
csharp 2.cs 258ms 2.7ms 83.9MB 217ms 43ms dotnet 9.0.101
csharp 1.cs 265ms 1.4ms 73.2MB 223ms 47ms mono 6.12.0
csharp 1.cs 278ms 7.3ms 101.3MB 237ms 57ms dotnet 9.0.101
java 1.java 416ms 29ms 341.8MB 207ms 283ms openjdk/zgc 21

nbody

Input: 5000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 9.cs 359ms 1.6ms 34.0MB 337ms 7ms dotnet 9.0.101
csharp 8.cs 373ms 3.9ms 15.7MB 357ms 0ms dotnet/aot 9.0.101
csharp 8.cs 426ms 13ms 33.8MB 390ms 13ms dotnet 9.0.101
java 1.java 440ms 1.4ms 45.1MB 480ms 17ms openjdk 21
java 1.java 442ms 1.9ms 48.1MB 480ms 10ms openjdk 23
java 1.java 448ms 9.7ms 84.8MB 477ms 23ms graal/jvm 17.0.8
java 1.java 564ms 1.4ms 44.6MB 477ms 143ms openjdk/zgc 21
java 2.java 1225ms 6.3ms 537.4MB 1353ms 73ms openjdk 21
csharp 8.cs 1248ms 3.3ms 24.1MB 1237ms 0ms mono 6.12.0
java 2.java 1260ms 20ms 715.9MB 1367ms 110ms openjdk 23
java 2.java 3206ms 52ms 2355.0MB 1643ms 1770ms openjdk/zgc 21

Input: 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 8.cs 46ms 0.6ms 15.9MB 33ms 0ms dotnet/aot 9.0.101
csharp 9.cs 91ms 0.7ms 33.8MB 70ms 10ms dotnet 9.0.101
csharp 8.cs 104ms 17ms 33.7MB 73ms 7ms dotnet 9.0.101
java 1.java 118ms 1.6ms 45.3MB 157ms 17ms openjdk 21
java 1.java 122ms 0.2ms 48.4MB 160ms 10ms openjdk 23
java 1-m.java 122ms 5.7ms 95.3MB 160ms 30ms graal/jvm 17.0.8
csharp 8.cs 161ms 1.4ms 22.5MB 147ms 3ms mono 6.12.0
java 1.java 245ms 1.2ms 44.5MB 160ms 143ms openjdk/zgc 21
java 2-m.java 296ms 5.5ms 346.7MB 430ms 57ms openjdk 21
java 2-m.java 298ms 3.8ms 394.1MB 427ms 70ms openjdk 23
java 2.java 682ms 11ms 527.4MB 467ms 393ms openjdk/zgc 21

nsieve

Input: 12

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 1.cs 300ms 3.9ms 53.0MB 280ms 3ms dotnet/aot 9.0.101
csharp 1.cs 346ms 9.8ms 104.3MB 320ms 10ms dotnet 9.0.101
java 1.java 391ms 1.1ms 115.8MB 443ms 20ms openjdk 21
java 1.java 392ms 5.2ms 118.3MB 427ms 30ms openjdk 23
csharp 2.cs 397ms 3.3ms 39.8MB 373ms 10ms dotnet 9.0.101
csharp 2.cs 421ms 2.4ms 20.9MB 410ms 0ms dotnet/aot 9.0.101
csharp 1.cs 533ms 4.1ms 87.7MB 510ms 13ms mono 6.12.0
java 1.java 570ms 10.0ms 112.7MB 470ms 170ms openjdk/zgc 21
java 1-m.java 588ms 6.1ms 209.4MB 843ms 73ms graal/jvm 17.0.8
java 2.java 771ms 0.6ms 57.5MB 827ms 17ms openjdk 21
java 2.java 780ms 1.5ms 60.4MB 823ms 20ms openjdk 23
java 2.java 837ms 5.8ms 55.2MB 767ms 137ms openjdk/zgc 21
java 2-m.java 1402ms 78ms 263.6MB 2503ms 113ms graal/jvm 17.0.8
csharp 2.cs 1854ms 4.3ms 29.5MB 1840ms 3ms mono 6.12.0

Input: 10

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 1.cs 69ms 2.3ms 23.8MB 50ms 7ms dotnet/aot 9.0.101
csharp 1.cs 106ms 6.1ms 43.3MB 80ms 10ms dotnet 9.0.101
csharp 2.cs 108ms 2.4ms 15.9MB 97ms 0ms dotnet/aot 9.0.101
csharp 2.cs 136ms 16ms 36.4MB 110ms 3ms dotnet 9.0.101
csharp 1.cs 144ms 3.6ms 38.0MB 127ms 7ms mono 6.12.0
java 1.java 153ms 3.0ms 64.5MB 190ms 27ms openjdk 21
java 1.java 156ms 7.2ms 68.1MB 203ms 20ms openjdk 23
java 1-m.java 201ms 5.1ms 130.4MB 277ms 43ms graal/jvm 17.0.8
java 2.java 260ms 2.7ms 50.8MB 303ms 20ms openjdk 23
java 2.java 260ms 1.2ms 49.6MB 313ms 20ms openjdk 21
java 1.java 281ms 1.4ms 61.6MB 200ms 143ms openjdk/zgc 21
java 2.java 366ms 1.1ms 49.6MB 303ms 140ms openjdk/zgc 21
csharp 2.cs 482ms 5.6ms 24.9MB 467ms 3ms mono 6.12.0
java 2-m.java 555ms 44ms 205.4MB 983ms 77ms graal/jvm 17.0.8

pidigits

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
java 1.java 3168ms 1.6ms 445.4MB 3600ms 83ms graal/jvm 17.0.8
csharp 1.cs 3202ms 11ms 19.7MB 3107ms 90ms dotnet/aot 9.0.101
csharp 1.cs 3575ms 22ms 44.1MB 3557ms 143ms dotnet 9.0.101
java 1.java 3621ms 25ms 412.3MB 4497ms 110ms openjdk 23
java 1.java 3704ms 51ms 351.8MB 4517ms 123ms openjdk 21
java 1.java timeout 0.0ms 1977.1MB 4647ms 1220ms openjdk/zgc 21

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 1.cs 753ms 3.4ms 19.3MB 713ms 27ms dotnet/aot 9.0.101
java 1.java 906ms 26ms 373.8MB 1277ms 77ms graal/jvm 17.0.8
csharp 1.cs 975ms 4.5ms 43.7MB 1040ms 57ms dotnet 9.0.101
java 1-m.java 1002ms 33ms 351.1MB 1813ms 80ms openjdk 21
java 1-m.java 1037ms 4.5ms 395.1MB 1743ms 97ms openjdk 23
java 1.java 2001ms 40ms 1342.4MB 1710ms 1033ms openjdk/zgc 21

regex-redux

Input: 2500000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 6.cs 1761ms 5.2ms 429.6MB 1657ms 153ms dotnet/aot 9.0.101
csharp 5.cs 2106ms 45ms 454.9MB 2140ms 210ms dotnet 9.0.101
csharp 6.cs 2759ms 116ms 449.2MB 2697ms 177ms dotnet 9.0.101
csharp 5.cs 4231ms 11ms 430.8MB 4123ms 163ms dotnet/aot 9.0.101
java 3.java timeout 0.0ms 408.4MB 5420ms 80ms graal/jvm 17.0.8
java 3.java timeout 0.0ms 302.4MB 5360ms 60ms openjdk 21
java 3.java timeout 0.0ms 306.8MB 5323ms 53ms openjdk 23
java 3.java timeout 0.0ms 469.0MB 4937ms 320ms openjdk/zgc 21

Input: 250000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 6.cs 190ms 0.6ms 54.2MB 163ms 23ms dotnet/aot 9.0.101
csharp 5.cs 291ms 5.7ms 80.4MB 253ms 37ms dotnet 9.0.101
csharp 6.cs 391ms 6.5ms 76.7MB 367ms 20ms dotnet 9.0.101
csharp 5.cs 436ms 0.8ms 57.4MB 413ms 17ms dotnet/aot 9.0.101
java 3-m.java 788ms 7.7ms 178.0MB 1167ms 60ms graal/jvm 17.0.8
java 3-m.java 802ms 7.5ms 134.3MB 1183ms 47ms openjdk 23
java 3-m.java 819ms 17ms 131.2MB 1203ms 33ms openjdk 21
java 3.java 979ms 47ms 134.3MB 1163ms 167ms openjdk/zgc 21

spectral-norm

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 3-m.cs 1858ms 0.9ms 18.2MB 7250ms 10ms dotnet/aot 9.0.101
java 2-m.java 1954ms 2.3ms 47.6MB 7430ms 27ms openjdk 21
java 2-m.java 1957ms 10.0ms 48.4MB 7443ms 27ms openjdk 23
java 2-m.java 2087ms 15ms 47.8MB 7507ms 150ms openjdk/zgc 21
csharp 3-m.cs 2189ms 252ms 38.0MB 6870ms 10ms dotnet 9.0.101
java 2-m.java 2463ms 18ms 101.0MB 8780ms 43ms graal/jvm 17.0.8
csharp 3-m.cs 4588ms 37ms 28.7MB 17757ms 13ms mono 6.12.0

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 3-m.cs 476ms 1.0ms 18.3MB 1810ms 7ms dotnet/aot 9.0.101
csharp 3-m.cs 530ms 2.0ms 37.9MB 1857ms 17ms dotnet 9.0.101
java 2-m.java 581ms 3.1ms 48.0MB 2053ms 13ms openjdk 21
java 2-m.java 590ms 3.1ms 48.8MB 2057ms 23ms openjdk 23
java 2-m.java 712ms 6.8ms 47.4MB 2073ms 143ms openjdk/zgc 21
java 2-m.java 730ms 13ms 100.2MB 2463ms 43ms graal/jvm 17.0.8
csharp 3-m.cs 1305ms 182ms 34.4MB 4597ms 17ms mono 6.12.0

Input: 2000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 3-m.cs 129ms 1.1ms 18.5MB 443ms 7ms dotnet/aot 9.0.101
csharp 3-m.cs 179ms 1.4ms 36.5MB 507ms 0ms dotnet 9.0.101
java 2-m.java 235ms 9.8ms 47.9MB 683ms 17ms openjdk 21
java 2-m.java 238ms 3.7ms 48.8MB 667ms 27ms openjdk 23
java 2-m.java 282ms 17ms 99.0MB 820ms 43ms graal/jvm 17.0.8
csharp 3-m.cs 355ms 13ms 30.3MB 1183ms 10ms mono 6.12.0
java 2-m.java 360ms 7.4ms 47.0MB 673ms 150ms openjdk/zgc 21

coro-prime-sieve

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
java 1-m.java 1774ms 162ms 260.9MB 6640ms 123ms openjdk 21
csharp 1-m.cs 2209ms 28ms 66.3MB 7577ms 63ms dotnet/aot 9.0.101
java 1-m.java 2359ms 176ms 242.2MB 8950ms 137ms openjdk 23
java 1-m.java 2678ms 125ms 1210.6MB 8550ms 1040ms openjdk/zgc 21
csharp 1-m.cs 2697ms 176ms 81.2MB 8370ms 97ms dotnet 9.0.101

Input: 1000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 1-m.cs 174ms 1.5ms 29.0MB 487ms 20ms dotnet/aot 9.0.101
csharp 1-m.cs 275ms 10ms 50.2MB 780ms 23ms dotnet 9.0.101
java 1-m.java 399ms 60ms 94.6MB 1303ms 47ms openjdk 23
java 1-m.java 407ms 34ms 120.2MB 1323ms 70ms openjdk 21
java 1-m.java 641ms 37ms 215.7MB 1710ms 250ms openjdk/zgc 21