Java VS C# benchmarks

Current benchmark data was generated on Sat Jan 28 2023, full log can be found HERE

CONTRIBUTIONS are WELCOME!

[x86_64][2 cores] Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz (Model 106)

* -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 665ms 6.1ms 412.0MB 690ms 70ms openjdk 20
java 2.java 719ms 58ms 602.2MB 703ms 117ms openjdk 19
java 2.java 760ms 59ms 667.2MB 823ms 147ms graal/jvm 17.0.6
csharp 1.cs 1219ms 41ms 381.4MB 1150ms 170ms dotnet/aot 7.0.102
java 2.java 1276ms 25ms 1068.3MB 903ms 577ms openjdk/zgc 19
csharp 1.cs 1518ms 32ms 478.5MB 1357ms 213ms dotnet 7.0.102
csharp 1.cs 2160ms 13ms 97.0MB 2463ms 157ms mono 6.12.0

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 1.cs 123ms 4.5ms 75.0MB 100ms 20ms dotnet/aot 7.0.102
csharp 1.cs 152ms 1.0ms 42.2MB 133ms 7ms mono 6.12.0
java 2.java 167ms 1.7ms 109.0MB 167ms 30ms openjdk 19
java 2.java 169ms 16ms 108.4MB 163ms 20ms openjdk 20
java 2-m.java 172ms 3.9ms 157.8MB 217ms 43ms graal/jvm 17.0.6
csharp 1.cs 257ms 5.5ms 170.0MB 187ms 43ms dotnet 7.0.102
java 2.java 295ms 1.6ms 248.7MB 197ms 137ms openjdk/zgc 19

edigits

Input: 250001

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
java 1-m.java 778ms 13ms 204.8MB 1363ms 63ms openjdk 20
java 1-m.java 846ms 64ms 301.8MB 1367ms 70ms graal/jvm 17.0.6
java 1-m.java 877ms 15ms 199.6MB 1570ms 57ms openjdk 19
java 1-m.java 1013ms 13ms 429.1MB 1507ms 290ms openjdk/zgc 19
csharp 1.cs timeout 0.0ms 110.3MB 4933ms 23ms dotnet 7.0.102
csharp 1.cs timeout 0.0ms 22.4MB 4980ms 3ms dotnet/aot 7.0.102

Input: 100000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
java 1-m.java 367ms 12ms 159.9MB 603ms 50ms graal/jvm 17.0.6
java 1-m.java 441ms 18ms 118.0MB 737ms 23ms openjdk 19
java 1-m.java 466ms 5.9ms 115.5MB 780ms 40ms openjdk 20
java 1-m.java 550ms 40ms 209.2MB 790ms 137ms openjdk/zgc 19
csharp 1.cs 1006ms 1.8ms 19.1MB 1000ms 0ms dotnet/aot 7.0.102
csharp 1.cs 1115ms 4.9ms 105.6MB 1063ms 23ms dotnet 7.0.102

fannkuch-redux

Input: 11

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
java 1-m.java 1668ms 10ms 95.1MB 3183ms 20ms graal/jvm 17.0.6
java 1-m.java 1741ms 6.4ms 43.8MB 3257ms 50ms openjdk/zgc 19
java 1-m.java 1751ms 36ms 43.7MB 3357ms 20ms openjdk 19
java 1-m.java 1789ms 119ms 41.1MB 3427ms 10ms openjdk 20

Input: 10

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
java 1-m.java 277ms 4.7ms 43.6MB 440ms 20ms openjdk 19
java 1-m.java 278ms 2.5ms 40.5MB 453ms 7ms openjdk 20
java 1-m.java 283ms 4.5ms 90.9MB 463ms 10ms graal/jvm 17.0.6
java 1-m.java 321ms 3.3ms 43.8MB 440ms 57ms openjdk/zgc 19

fasta

Input: 2500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 5-m.cs 345ms 24ms 60.9MB 567ms 77ms dotnet/aot 7.0.102
csharp 5-m.cs 501ms 41ms 126.4MB 763ms 123ms dotnet 7.0.102
csharp 5-m.cs 507ms 27ms 83.1MB 870ms 87ms mono 6.12.0
java 4.java 515ms 1.8ms 40.7MB 587ms 10ms openjdk 20
java 4.java 523ms 4.9ms 42.2MB 587ms 17ms openjdk 19
java 4.java 561ms 7.1ms 43.3MB 583ms 57ms openjdk/zgc 19
java 4.java 617ms 8.7ms 99.3MB 793ms 30ms graal/jvm 17.0.6

Input: 250000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 5-m.cs 65ms 5.3ms 24.4MB 80ms 23ms dotnet/aot 7.0.102
csharp 5-m.cs 86ms 3.0ms 36.2MB 107ms 23ms mono 6.12.0
csharp 5.cs 128ms 12ms 109.4MB 113ms 37ms dotnet 7.0.102
java 4.java 151ms 6.6ms 41.0MB 173ms 10ms openjdk 19
java 4.java 155ms 11ms 89.1MB 203ms 17ms graal/jvm 17.0.6
java 4.java 155ms 5.7ms 40.1MB 183ms 7ms openjdk 20
java 4.java 191ms 4.0ms 41.1MB 167ms 50ms openjdk/zgc 19

helloworld

Input: QwQ

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 1.cs 6.0ms 1.1ms 9.2MB 0ms 0ms dotnet/aot 7.0.102
csharp 1.cs 19ms 0.4ms 24.2MB 10ms 0ms mono 6.12.0
csharp 1.cs 72ms 2.1ms 101.6MB 32ms 12ms dotnet 7.0.102
java 1.java 76ms 6.2ms 63.1MB 70ms 10ms graal/jvm 17.0.6
java 1.java 79ms 3.3ms 39.3MB 74ms 10ms openjdk 20
java 1.java 81ms 3.7ms 41.3MB 76ms 8ms openjdk 19
java 1.java 119ms 4.3ms 39.7MB 76ms 48ms openjdk/zgc 19

knucleotide

Input: 2500000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 6.cs 942ms 7.8ms 53.5MB 1393ms 17ms dotnet/aot 7.0.102
csharp 6-m.cs 1168ms 31ms 145.7MB 1973ms 37ms dotnet 7.0.102
java 3-m.java 1450ms 24ms 113.3MB 2653ms 33ms openjdk 20
java 3-m.java 1455ms 8.2ms 116.8MB 2667ms 33ms openjdk 19
java 3-m.java 1562ms 78ms 169.4MB 2877ms 47ms graal/jvm 17.0.6
csharp 6-m.cs 1634ms 77ms 71.9MB 2640ms 27ms mono 6.12.0
java 3-m.java 1982ms 73ms 174.2MB 3517ms 120ms openjdk/zgc 19

Input: 250000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 6.cs 145ms 1.0ms 40.2MB 167ms 17ms dotnet/aot 7.0.102
csharp 6.cs 235ms 6.8ms 51.1MB 303ms 13ms mono 6.12.0
csharp 6.cs 280ms 4.4ms 132.9MB 300ms 40ms dotnet 7.0.102
java 3-m.java 444ms 36ms 87.4MB 730ms 30ms openjdk 20
java 3-m.java 473ms 46ms 96.2MB 803ms 27ms openjdk 19
java 3-m.java 487ms 49ms 139.1MB 790ms 50ms graal/jvm 17.0.6
java 3-m.java 490ms 25ms 96.3MB 743ms 87ms openjdk/zgc 19

mandelbrot

Input: 5000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 2.cs 753ms 12ms 165.8MB 687ms 37ms dotnet 7.0.102
java 1b.java 1420ms 19ms 48.3MB 1510ms 17ms openjdk 19
java 1b.java 1423ms 14ms 47.0MB 1507ms 20ms openjdk 20
java 1b.java 1456ms 25ms 108.3MB 1617ms 47ms graal/jvm 17.0.6
java 1b.java 1460ms 14ms 48.8MB 1513ms 53ms openjdk/zgc 19
java 1a.java 1533ms 4.6ms 48.4MB 1597ms 20ms openjdk 19
java 1a.java 1544ms 4.9ms 47.5MB 1620ms 13ms openjdk 20
java 1a.java 1566ms 5.9ms 99.4MB 1637ms 40ms graal/jvm 17.0.6
java 1a.java 1580ms 6.9ms 49.3MB 1610ms 53ms openjdk/zgc 19
java 1.java 2007ms 7.7ms 135.6MB 2093ms 30ms graal/jvm 17.0.6
java 1.java 2113ms 8.6ms 208.1MB 2147ms 47ms openjdk 20
java 1.java 2140ms 25ms 190.1MB 2187ms 47ms openjdk 19
java 1.java 2498ms 7.7ms 578.7MB 2253ms 333ms openjdk/zgc 19
csharp 3.cs 3602ms 62ms 111.5MB 3550ms 17ms dotnet 7.0.102
csharp 1.cs 4047ms 52ms 107.7MB 3987ms 17ms dotnet 7.0.102
csharp 3.cs 4739ms 130ms 19.7MB 4733ms 0ms dotnet/aot 7.0.102
csharp 1.cs timeout 0.0ms 12.5MB 4993ms 0ms dotnet/aot 7.0.102
csharp 1.cs timeout 0.0ms 22.9MB 4987ms 0ms mono 6.12.0
java 2.java timeout 0.0ms 526.6MB 5170ms 110ms openjdk 19
java 2.java timeout 0.0ms 575.3MB 5157ms 120ms openjdk 20
java 2.java timeout 0.0ms 1227.2MB 4887ms 573ms openjdk/zgc 19

Input: 1000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 2.cs 143ms 7.9ms 111.8MB 93ms 20ms dotnet 7.0.102
csharp 3.cs 207ms 3.2ms 14.4MB 200ms 0ms dotnet/aot 7.0.102
java 1b.java 208ms 16ms 43.2MB 277ms 7ms openjdk 20
java 1a.java 219ms 12ms 48.3MB 300ms 13ms openjdk 19
java 1a.java 220ms 16ms 43.6MB 300ms 7ms openjdk 20
csharp 1.cs 222ms 2.9ms 12.3MB 213ms 0ms dotnet/aot 7.0.102
java 1.java 224ms 7.6ms 96.8MB 273ms 20ms openjdk 19
java 1a.java 225ms 11ms 92.2MB 287ms 27ms graal/jvm 17.0.6
java 1b.java 226ms 15ms 46.4MB 290ms 13ms openjdk 19
java 1.java 228ms 9.6ms 95.3MB 270ms 20ms openjdk 20
csharp 1.cs 246ms 1.2ms 104.4MB 197ms 17ms dotnet 7.0.102
java 1.java 247ms 19ms 124.2MB 343ms 27ms graal/jvm 17.0.6
csharp 3.cs 251ms 3.2ms 104.6MB 203ms 20ms dotnet 7.0.102
java 1a.java 252ms 8.5ms 45.1MB 257ms 57ms openjdk/zgc 19
java 1b-m.java 259ms 19ms 98.7MB 390ms 27ms graal/jvm 17.0.6
java 1b.java 264ms 4.2ms 45.4MB 293ms 50ms openjdk/zgc 19
java 1.java 288ms 1.8ms 111.3MB 287ms 77ms openjdk/zgc 19
java 2.java 767ms 32ms 532.3MB 950ms 133ms openjdk 19
java 2.java 769ms 20ms 581.5MB 960ms 113ms openjdk 20
csharp 1.cs 832ms 2.4ms 26.3MB 817ms 0ms mono 6.12.0
java 2.java 1331ms 80ms 1038.9MB 1020ms 583ms openjdk/zgc 19

merkletrees

Input: 17

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
java 1.java 505ms 22ms 369.4MB 543ms 47ms openjdk 19
java 1.java 534ms 50ms 290.5MB 547ms 53ms openjdk 20
java 1.java 574ms 78ms 352.8MB 723ms 90ms graal/jvm 17.0.6
csharp 2.cs 774ms 7.0ms 370.7MB 663ms 153ms dotnet/aot 7.0.102
csharp 1.cs 823ms 7.1ms 382.8MB 703ms 163ms dotnet/aot 7.0.102
java 1.java 951ms 43ms 764.9MB 647ms 437ms openjdk/zgc 19
csharp 2.cs 1003ms 12ms 469.9MB 807ms 203ms dotnet 7.0.102
csharp 1.cs 1053ms 12ms 510.7MB 840ms 220ms dotnet 7.0.102
csharp 1.cs 1638ms 16ms 145.5MB 1970ms 133ms mono 6.12.0

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 2.cs 156ms 2.7ms 73.9MB 130ms 27ms dotnet/aot 7.0.102
java 1.java 216ms 5.7ms 173.4MB 240ms 30ms openjdk 19
java 1.java 234ms 11ms 222.3MB 227ms 57ms openjdk 20
csharp 1.cs 235ms 4.3ms 207.9MB 157ms 70ms dotnet/aot 7.0.102
java 1-m.java 270ms 4.6ms 281.7MB 367ms 67ms graal/jvm 17.0.6
csharp 1.cs 303ms 2.1ms 72.0MB 277ms 33ms mono 6.12.0
csharp 2.cs 386ms 1.7ms 171.0MB 323ms 47ms dotnet 7.0.102
csharp 1.cs 386ms 9.3ms 279.7MB 250ms 103ms dotnet 7.0.102
java 1.java 432ms 11ms 354.8MB 253ms 223ms openjdk/zgc 19

nbody

Input: 5000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 9.cs 428ms 2.1ms 100.0MB 387ms 13ms dotnet 7.0.102
csharp 8.cs 500ms 2.6ms 10.2MB 493ms 0ms dotnet/aot 7.0.102
java 1.java 542ms 2.3ms 88.2MB 563ms 23ms graal/jvm 17.0.6
csharp 8.cs 554ms 1.4ms 102.3MB 510ms 10ms dotnet 7.0.102
java 1.java 565ms 6.7ms 40.5MB 563ms 20ms openjdk 20
java 1.java 568ms 4.5ms 44.3MB 573ms 10ms openjdk 19
java 1.java 613ms 5.8ms 41.9MB 580ms 50ms openjdk/zgc 19
csharp 8.cs 1108ms 0.6ms 24.3MB 1090ms 3ms mono 6.12.0
java 2.java 1881ms 18ms 552.6MB 1900ms 113ms openjdk 20
java 2.java 1893ms 4.6ms 532.8MB 1910ms 107ms openjdk 19
java 2.java 2574ms 9.2ms 1220.9MB 1993ms 770ms openjdk/zgc 19

Input: 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 8.cs 55ms 0.5ms 12.0MB 50ms 0ms dotnet/aot 7.0.102
csharp 9.cs 118ms 2.6ms 100.0MB 73ms 17ms dotnet 7.0.102
csharp 8.cs 127ms 4.5ms 102.3MB 77ms 23ms dotnet 7.0.102
csharp 8.cs 132ms 1.4ms 25.1MB 120ms 0ms mono 6.12.0
java 1.java 137ms 1.3ms 86.0MB 163ms 23ms graal/jvm 17.0.6
java 1.java 144ms 3.4ms 42.3MB 157ms 10ms openjdk 19
java 1.java 149ms 7.7ms 40.7MB 160ms 10ms openjdk 20
java 1.java 191ms 2.6ms 44.1MB 160ms 50ms openjdk/zgc 19
java 2.java 414ms 6.8ms 335.1MB 487ms 63ms openjdk 19
java 2.java 416ms 8.0ms 338.5MB 477ms 67ms openjdk 20
java 2.java 701ms 44ms 528.8MB 540ms 313ms openjdk/zgc 19

nsieve

Input: 12

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 1.cs 655ms 63ms 71.8MB 633ms 13ms dotnet/aot 7.0.102
java 1.java 658ms 16ms 85.7MB 683ms 17ms openjdk 19
csharp 1.cs 722ms 25ms 86.7MB 700ms 3ms mono 6.12.0
csharp 2.cs 760ms 2.5ms 21.6MB 757ms 3ms dotnet/aot 7.0.102
java 1.java 780ms 41ms 84.9MB 797ms 30ms openjdk 20
java 1.java 906ms 5.7ms 112.0MB 847ms 80ms openjdk/zgc 19
csharp 2.cs 953ms 0.2ms 111.1MB 903ms 23ms dotnet 7.0.102
java 2.java 1003ms 6.2ms 50.6MB 1043ms 13ms openjdk 20
java 2.java 1017ms 5.7ms 54.0MB 1050ms 7ms openjdk 19
java 2.java 1027ms 2.0ms 50.5MB 1007ms 57ms openjdk/zgc 19
java 1-m.java 1131ms 52ms 244.6MB 1700ms 87ms graal/jvm 17.0.6
csharp 1.cs 1273ms 20ms 161.1MB 1220ms 23ms dotnet 7.0.102
java 2-m.java 1840ms 116ms 286.4MB 3240ms 110ms graal/jvm 17.0.6
csharp 2.cs 2426ms 5.4ms 31.9MB 2410ms 3ms mono 6.12.0

Input: 10

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 1.cs 134ms 0.6ms 27.8MB 127ms 3ms dotnet/aot 7.0.102
csharp 1.cs 181ms 0.5ms 39.0MB 167ms 0ms mono 6.12.0
csharp 2.cs 191ms 1.3ms 15.3MB 190ms 0ms dotnet/aot 7.0.102
java 1.java 236ms 3.3ms 61.7MB 253ms 23ms openjdk 19
java 1.java 239ms 7.2ms 58.4MB 260ms 13ms openjdk 20
java 1.java 284ms 2.1ms 60.7MB 260ms 60ms openjdk/zgc 19
csharp 2.cs 290ms 1.4ms 104.7MB 247ms 13ms dotnet 7.0.102
java 2.java 327ms 2.5ms 45.1MB 360ms 10ms openjdk 20
java 2.java 328ms 1.3ms 49.7MB 350ms 17ms openjdk 19
java 1-m.java 338ms 2.6ms 149.3MB 483ms 40ms graal/jvm 17.0.6
csharp 1.cs 344ms 6.0ms 114.8MB 290ms 23ms dotnet 7.0.102
java 2.java 359ms 6.6ms 43.9MB 343ms 50ms openjdk/zgc 19
csharp 2.cs 613ms 8.9ms 25.7MB 590ms 3ms mono 6.12.0
java 2-m.java 614ms 3.5ms 152.0MB 1087ms 47ms graal/jvm 17.0.6

pidigits

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 1.cs 4447ms 3.7ms 78.2MB 4410ms 43ms dotnet/aot 7.0.102
csharp 1.cs 4713ms 26ms 169.5MB 4653ms 77ms dotnet 7.0.102
java 1.java 4919ms 11ms 360.4MB 5340ms 87ms graal/jvm 17.0.6
java 1.java timeout 0.0ms 239.2MB 5423ms 90ms openjdk 19
java 1.java timeout 0.0ms 279.2MB 5390ms 80ms openjdk 20
java 1.java timeout 0.0ms 1254.0MB 5003ms 670ms openjdk/zgc 19

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 1.cs 1055ms 1.9ms 73.6MB 1033ms 17ms dotnet/aot 7.0.102
csharp 1.cs 1180ms 6.7ms 165.3MB 1170ms 37ms dotnet 7.0.102
java 1.java 1341ms 31ms 311.6MB 1660ms 80ms graal/jvm 17.0.6
java 1.java 1424ms 19ms 274.6MB 1790ms 63ms openjdk 19
java 1.java 1452ms 11ms 294.2MB 1840ms 70ms openjdk 20
java 1.java 1943ms 14ms 917.6MB 1850ms 570ms openjdk/zgc 19

regex-redux

Input: 2500000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 5.cs 3329ms 22ms 600.0MB 3280ms 227ms dotnet 7.0.102
csharp 6.cs 3601ms 2.5ms 459.1MB 3513ms 140ms dotnet/aot 7.0.102
csharp 6.cs 3875ms 36ms 596.2MB 3773ms 167ms dotnet 7.0.102
csharp 5.cs timeout 0.0ms 182.2MB 4977ms 67ms dotnet/aot 7.0.102
java 3.java timeout 0.0ms 251.6MB 5297ms 53ms graal/jvm 17.0.6
java 3.java timeout 0.0ms 205.8MB 5240ms 70ms openjdk 19
java 3.java timeout 0.0ms 204.2MB 5250ms 63ms openjdk 20
java 3.java timeout 0.0ms 337.4MB 4960ms 220ms openjdk/zgc 19

Input: 250000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 6.cs 379ms 3.0ms 68.4MB 360ms 13ms dotnet/aot 7.0.102
csharp 5.cs 480ms 5.5ms 163.8MB 417ms 43ms dotnet 7.0.102
csharp 6.cs 575ms 2.7ms 161.8MB 507ms 47ms dotnet 7.0.102
csharp 5.cs 691ms 5.9ms 71.3MB 667ms 17ms dotnet/aot 7.0.102
java 3.java 1031ms 22ms 171.4MB 1417ms 47ms graal/jvm 17.0.6
java 3.java 1061ms 34ms 109.9MB 1380ms 37ms openjdk 19
java 3.java 1064ms 6.8ms 114.5MB 1403ms 27ms openjdk 20
java 3.java 1191ms 24ms 157.7MB 1353ms 120ms openjdk/zgc 19

spectral-norm

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 3-m.cs 2524ms 1.5ms 13.6MB 4923ms 3ms dotnet/aot 7.0.102
java 2-m.java 4207ms 116ms 89.8MB 8140ms 20ms graal/jvm 17.0.6
csharp 3-m.cs 4419ms 13ms 103.0MB 8520ms 33ms dotnet 7.0.102
csharp 3.cs timeout 0.0ms 26.7MB 9787ms 0ms mono 6.12.0
java 2.java timeout 0.0ms 46.0MB 9730ms 17ms openjdk 19
java 2.java timeout 0.0ms 40.7MB 9717ms 13ms openjdk 20
java 2.java timeout 0.0ms 41.8MB 9627ms 43ms openjdk/zgc 19

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 3-m.cs 650ms 4.1ms 12.3MB 1233ms 3ms dotnet/aot 7.0.102
java 2-m.java 1208ms 43ms 91.2MB 2237ms 27ms graal/jvm 17.0.6
csharp 3-m.cs 1215ms 14ms 104.4MB 2240ms 23ms dotnet 7.0.102
java 2-m.java 1621ms 30ms 44.3MB 3063ms 17ms openjdk 19
java 2-m.java 1721ms 70ms 40.9MB 3273ms 10ms openjdk 20
java 2-m.java 1769ms 188ms 42.1MB 3277ms 53ms openjdk/zgc 19
csharp 3-m.cs 3182ms 84ms 27.5MB 6037ms 7ms mono 6.12.0

Input: 2000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 3-m.cs 181ms 3.8ms 12.3MB 317ms 3ms dotnet/aot 7.0.102
csharp 3-m.cs 392ms 1.6ms 104.3MB 620ms 20ms dotnet 7.0.102
java 2-m.java 435ms 21ms 89.1MB 727ms 33ms graal/jvm 17.0.6
java 2-m.java 552ms 40ms 41.0MB 977ms 13ms openjdk 20
java 2-m.java 589ms 38ms 44.3MB 1043ms 10ms openjdk 19
java 2-m.java 636ms 31ms 43.9MB 1040ms 57ms openjdk/zgc 19
csharp 3-m.cs 802ms 4.1ms 27.8MB 1517ms 7ms mono 6.12.0

coro-prime-sieve

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
java 1-m.java 1079ms 1868ms 169.2MB 8467ms 113ms openjdk 19
java 1-m.java 4163ms 65ms 906.7MB 7423ms 537ms openjdk/zgc 19
csharp 1-m.cs 4430ms 86ms 177.3MB 8227ms 73ms dotnet 7.0.102
csharp 1-m.cs 4903ms 68ms 81.8MB 9207ms 57ms dotnet/aot 7.0.102
java 1.java timeout 0.0ms 139.7MB 9567ms 47ms openjdk 20

Input: 1000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
csharp 1-m.cs 309ms 21ms 60.1MB 513ms 27ms dotnet/aot 7.0.102
csharp 1-m.cs 549ms 12ms 157.4MB 870ms 40ms dotnet 7.0.102
java 1-m.java 766ms 114ms 112.0MB 1377ms 37ms openjdk 20
java 1-m.java 817ms 154ms 113.2MB 1453ms 47ms openjdk 19
java 1-m.java 950ms 24ms 315.6MB 1520ms 173ms openjdk/zgc 19