D VS Java benchmarks

Current benchmark data was generated on Sat Nov 16 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 7.7ms 638.0MB 577ms 97ms openjdk 23
java 2.java 471ms 26ms 576.1MB 553ms 93ms openjdk 21
java 2-m.java 471ms 4.1ms 646.9MB 670ms 100ms graal/jvm 17.0.8
java 2.java 1177ms 9.4ms 1047.0MB 560ms 777ms openjdk/zgc 21
d 1.d 1714ms 10ms 312.4MB 1680ms 40ms ldc2 1.39.0
d 1.d 2690ms 19ms 314.8MB 2890ms 27ms dmd 2.109.1

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
java 2-m.java 121ms 3.3ms 98.0MB 150ms 37ms openjdk 23
java 2.java 123ms 1.3ms 167.1MB 143ms 37ms openjdk 21
d 1.d 161ms 4.1ms 209.0MB 127ms 20ms ldc2 1.39.0
java 2-m.java 170ms 4.2ms 230.2MB 260ms 47ms graal/jvm 17.0.8
d 1.d 233ms 2.4ms 210.6MB 207ms 10ms dmd 2.109.1
java 2.java 309ms 1.6ms 242.5MB 163ms 200ms 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 1914ms 216ms 260.7MB 7217ms 110ms openjdk 21
java 1-m.java 2372ms 102ms 240.5MB 9013ms 113ms openjdk 23
java 1-m.java 2694ms 224ms 1170.6MB 8560ms 1093ms openjdk/zgc 21
d 1.d timeout 0.0ms 16.5MB 4957ms 33ms dmd 2.109.1
d 1.d timeout 0.0ms 14.8MB 4950ms 30ms ldc2 1.39.0

Input: 1000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
java 1-m.java 413ms 6.1ms 91.0MB 1353ms 50ms openjdk 23
java 1-m.java 422ms 18ms 122.6MB 1387ms 63ms openjdk 21
java 1-m.java 641ms 15ms 216.0MB 1743ms 227ms openjdk/zgc 21
d 1.d 1049ms 8.0ms 8.4MB 1023ms 10ms ldc2 1.39.0
d 1.d 1313ms 9.7ms 10.8MB 1290ms 13ms dmd 2.109.1

edigits

Input: 250001

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
java 1-m.java 640ms 33ms 265.7MB 1690ms 80ms openjdk 21
java 1-m.java 642ms 52ms 228.2MB 1693ms 77ms openjdk 23
java 1-m.java 643ms 11ms 376.6MB 1230ms 117ms graal/jvm 17.0.8
java 1-m.java 949ms 30ms 530.5MB 1617ms 407ms openjdk/zgc 21
d 1.d 2539ms 2.5ms 8.1MB 2530ms 0ms ldc2 1.39.0
d 1.d 2922ms 4.0ms 10.3MB 2913ms 3ms dmd 2.109.1

Input: 100000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
java 1-m.java 326ms 41ms 231.0MB 630ms 70ms graal/jvm 17.0.8
java 1-m.java 356ms 19ms 124.5MB 953ms 67ms openjdk 23
java 1-m.java 388ms 12ms 196.0MB 1040ms 63ms openjdk 21
d 1.d 441ms 1.2ms 7.9MB 430ms 0ms ldc2 1.39.0
java 1-m.java 524ms 36ms 217.6MB 1027ms 217ms openjdk/zgc 21
d 1.d 535ms 5.9ms 10.1MB 523ms 0ms dmd 2.109.1

fannkuch-redux

Input: 11

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
d 1-im.d 393ms 36ms 5.1MB 1413ms 0ms ldc2 1.39.0
java 1-m.java 883ms 4.1ms 100.1MB 3233ms 47ms graal/jvm 17.0.8
java 1-m.java 959ms 4.0ms 48.5MB 3550ms 30ms openjdk 21
java 1-m.java 977ms 6.4ms 50.1MB 3600ms 17ms openjdk 23
java 1-m.java 1019ms 44ms 46.0MB 3303ms 137ms openjdk/zgc 21
d 2-im.d 1136ms 27ms 5.1MB 4287ms 0ms ldc2 1.39.0
d 1-i.d 1481ms 0.7ms 2.8MB 1467ms 0ms ldc2 1.39.0
d 1.d 3136ms 26ms 2.8MB 3123ms 0ms ldc2 1.39.0
d 2-i.d 3223ms 4.8ms 2.8MB 3210ms 0ms ldc2 1.39.0
d 1.d 3502ms 2.1ms 4.6MB 3490ms 0ms dmd 2.109.1
d 1-im.d 4227ms 47ms 8.7MB 16457ms 0ms dmd 2.109.1
d 1-i.d timeout 0.0ms 4.5MB 4990ms 0ms dmd 2.109.1
d 2-i.d timeout 0.0ms 4.6MB 4990ms 0ms dmd 2.109.1
d 2-im.d timeout 0.0ms 6.8MB 19710ms 10ms dmd 2.109.1

Input: 10

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
d 1-im.d 40ms 2.1ms 4.9MB 110ms 0ms ldc2 1.39.0
d 2-im.d 100ms 1.6ms 5.1MB 343ms 0ms ldc2 1.39.0
d 1-i.d 124ms 0.3ms 2.8MB 117ms 0ms ldc2 1.39.0
java 1-m.java 185ms 12ms 48.4MB 490ms 30ms openjdk 21
java 1-m.java 195ms 8.3ms 50.1MB 497ms 30ms openjdk 23
java 1-m.java 198ms 13ms 102.1MB 540ms 43ms graal/jvm 17.0.8
d 1.d 264ms 4.4ms 2.8MB 253ms 0ms ldc2 1.39.0
d 2-i.d 267ms 1.0ms 2.9MB 253ms 0ms ldc2 1.39.0
d 1.d 296ms 2.1ms 4.6MB 287ms 0ms dmd 2.109.1
java 1-m.java 300ms 5.1ms 45.9MB 493ms 137ms openjdk/zgc 21
d 1-im.d 355ms 4.0ms 6.9MB 1340ms 0ms dmd 2.109.1
d 2-im.d 531ms 2.2ms 8.8MB 1990ms 0ms dmd 2.109.1
d 1-i.d 863ms 34ms 4.5MB 853ms 0ms dmd 2.109.1
d 2-i.d 1415ms 9.9ms 4.5MB 1403ms 0ms dmd 2.109.1

fasta

Input: 2500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
d 1.d 196ms 1.6ms 31.9MB 177ms 3ms ldc2 1.39.0
java 4.java 450ms 4.7ms 47.5MB 527ms 20ms openjdk 21
java 4.java 453ms 13ms 106.3MB 630ms 47ms graal/jvm 17.0.8
java 4.java 466ms 10ms 49.3MB 560ms 17ms openjdk 23
java 4.java 560ms 11ms 45.2MB 537ms 127ms openjdk/zgc 21
d 1.d 623ms 3.2ms 48.0MB 607ms 10ms dmd 2.109.1

Input: 250000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
d 1.d 24ms 0.6ms 7.3MB 17ms 0ms ldc2 1.39.0
d 1.d 66ms 0.7ms 12.2MB 60ms 0ms dmd 2.109.1
java 4.java 122ms 1.2ms 46.7MB 167ms 17ms openjdk 21
java 4-m.java 126ms 2.6ms 47.9MB 163ms 27ms openjdk 23
java 4-m.java 130ms 3.9ms 97.0MB 177ms 43ms graal/jvm 17.0.8
java 4.java 243ms 1.7ms 45.8MB 170ms 130ms openjdk/zgc 21

helloworld

Input: QwQ

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
d 1.d 1.7ms 0.2ms 2.9MB 0ms 0ms ldc2 1.39.0
d 1.d 2.3ms 0.3ms 5.1MB 0ms 0ms dmd 2.109.1
java 1.java 64ms 3.0ms 58.5MB 62ms 24ms graal/jvm 17.0.8
java 1.java 68ms 5.7ms 44.4MB 68ms 20ms openjdk 23
java 1.java 71ms 3.9ms 43.8MB 72ms 22ms openjdk 21
java 1.java 186ms 3.8ms 44.8MB 76ms 136ms openjdk/zgc 21

http-server

Input: 3000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
d 1-m.d 3.6ms 6.2ms 18.1MB 355ms 765ms ldc2 1.39.0
d 1.d 1033ms 0.9ms 22.7MB 413ms 777ms dmd 2.109.1
d 2.d 1035ms 0.6ms 25.0MB 443ms 757ms dmd 2.109.1
d 2.d timeout 0.0ms 22.1MB 333ms 780ms ldc2 1.39.0

Input: 500

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
d 2.d 338ms 585ms 22.0MB 50ms 140ms ldc2 1.39.0
d 1.d 1015ms 0.5ms 20.1MB 67ms 127ms ldc2 1.39.0
d 2.d 1015ms 0.4ms 24.4MB 77ms 133ms dmd 2.109.1
d 1.d 1015ms 0.5ms 24.6MB 63ms 140ms dmd 2.109.1

json-serde

Input: sample 5000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
d 2-m.d 71ms 21ms 15.5MB 70ms 50ms ldc2 1.39.0
d 2.d 241ms 1.1ms 22.6MB 240ms 10ms dmd 2.109.1

Input: canada 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
d 2.d 472ms 2.3ms 139.9MB 443ms 33ms ldc2 1.39.0
d 2.d 2492ms 4.3ms 157.1MB 2493ms 43ms dmd 2.109.1

knucleotide

Input: 2500000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
d 1-m.d 793ms 57ms 51.9MB 2410ms 20ms ldc2 1.39.0
java 3-m.java 997ms 74ms 129.0MB 3383ms 50ms openjdk 21
java 3-m.java 1028ms 48ms 160.8MB 3493ms 63ms openjdk 23
java 3-m.java 1086ms 55ms 180.1MB 3670ms 77ms graal/jvm 17.0.8
java 3-m.java 1378ms 17ms 178.8MB 4300ms 213ms openjdk/zgc 21
d 1-m.d 1878ms 30ms 54.8MB 5587ms 17ms dmd 2.109.1

Input: 250000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
d 1-m.d 99ms 1.8ms 42.1MB 253ms 13ms ldc2 1.39.0
d 1-m.d 203ms 2.6ms 45.9MB 587ms 13ms dmd 2.109.1
java 3-m.java 326ms 2.0ms 99.6MB 943ms 47ms openjdk 21
java 3-m.java 334ms 11ms 138.4MB 887ms 57ms graal/jvm 17.0.8
java 3-m.java 350ms 15ms 90.0MB 1040ms 50ms openjdk 23
java 3-m.java 421ms 3.4ms 100.2MB 847ms 167ms openjdk/zgc 21

lru

Input: 1000 1000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
d 1.d 125ms 0.3ms 6.1MB 117ms 3ms ldc2 1.39.0
d 1.d 185ms 10ms 7.9MB 157ms 33ms dmd 2.109.1

Input: 1000 3000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
d 1.d 364ms 6.3ms 4.0MB 350ms 23ms ldc2 1.39.0
d 1.d 539ms 17ms 8.1MB 520ms 53ms dmd 2.109.1

Input: 100 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
d 1.d 55ms 1.7ms 5.9MB 43ms 0ms ldc2 1.39.0
d 1.d 79ms 0.9ms 8.2MB 70ms 0ms dmd 2.109.1

mandelbrot

Input: 5000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
d 1.d 409ms 4.3ms 7.5MB 397ms 0ms ldc2 1.39.0
java 1b.java 1154ms 15ms 54.4MB 1260ms 23ms openjdk 21
java 1b.java 1163ms 14ms 105.3MB 1310ms 43ms graal/jvm 17.0.8
java 1b.java 1171ms 30ms 55.3MB 1293ms 20ms openjdk 23
java 1.java 1247ms 10ms 137.6MB 1370ms 33ms graal/jvm 17.0.8
java 1b.java 1271ms 9.1ms 51.5MB 1260ms 140ms openjdk/zgc 21
java 1a.java 1650ms 7.6ms 55.2MB 1743ms 20ms openjdk 23
java 1a.java 1655ms 3.6ms 55.0MB 1747ms 23ms openjdk 21
java 1a.java 1681ms 13ms 104.5MB 1797ms 40ms graal/jvm 17.0.8
java 1.java 1687ms 5.5ms 202.5MB 1747ms 50ms openjdk 21
java 1.java 1703ms 7.0ms 301.7MB 1767ms 43ms openjdk 23
java 1a.java 1768ms 3.5ms 53.0MB 1737ms 143ms openjdk/zgc 21
d 1.d 2324ms 373ms 9.3MB 2313ms 0ms dmd 2.109.1
java 1.java 2351ms 1.2ms 855.0MB 1790ms 657ms openjdk/zgc 21
java 2.java timeout 0.0ms 696.3MB 5310ms 127ms openjdk 21
java 2.java timeout 0.0ms 744.4MB 5267ms 123ms openjdk 23
java 2.java timeout 0.0ms 3358.5MB 3360ms 2000ms openjdk/zgc 21

Input: 1000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
d 1.d 20ms 0.1ms 3.0MB 10ms 0ms ldc2 1.39.0
d 1.d 92ms 1.5ms 4.5MB 80ms 0ms dmd 2.109.1
java 1b-m.java 181ms 7.7ms 49.6MB 280ms 23ms openjdk 21
java 1b-m.java 186ms 2.0ms 50.6MB 293ms 17ms openjdk 23
java 1-m.java 187ms 2.3ms 81.8MB 257ms 33ms openjdk 21
java 1a-m.java 189ms 3.6ms 52.2MB 280ms 23ms openjdk 23
java 1a-m.java 189ms 0.3ms 50.1MB 283ms 30ms openjdk 21
java 1-m.java 190ms 3.3ms 114.5MB 283ms 43ms graal/jvm 17.0.8
java 1-m.java 191ms 4.3ms 86.8MB 260ms 33ms openjdk 23
java 1a-m.java 215ms 13ms 102.3MB 320ms 43ms graal/jvm 17.0.8
java 1b-m.java 227ms 19ms 108.0MB 373ms 47ms graal/jvm 17.0.8
java 1b.java 296ms 12ms 47.5MB 277ms 137ms openjdk/zgc 21
java 1a.java 312ms 2.2ms 49.8MB 297ms 137ms openjdk/zgc 21
java 1.java 331ms 6.3ms 116.4MB 257ms 163ms openjdk/zgc 21
java 2-m.java 552ms 12ms 598.8MB 837ms 87ms openjdk 21
java 2-m.java 564ms 13ms 755.5MB 837ms 97ms openjdk 23
java 2.java 1579ms 6.4ms 1347.9MB 837ms 1050ms openjdk/zgc 21

merkletrees

Input: 17

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
java 1.java 401ms 6.3ms 542.1MB 497ms 87ms openjdk 23
java 1.java 413ms 3.8ms 677.9MB 473ms 107ms openjdk 21
java 1-m.java 421ms 36ms 624.4MB 640ms 93ms graal/jvm 17.0.8
d 1.d 979ms 4.8ms 312.5MB 940ms 40ms ldc2 1.39.0
java 1.java 1080ms 2.8ms 968.3MB 450ms 743ms openjdk/zgc 21
d 1.d 1748ms 19ms 314.9MB 1883ms 40ms dmd 2.109.1

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
java 1-m.java 163ms 0.5ms 158.7MB 240ms 33ms openjdk 23
java 1-m.java 165ms 4.7ms 206.5MB 243ms 30ms openjdk 21
d 1.d 210ms 2.2ms 312.6MB 163ms 33ms ldc2 1.39.0
java 1-m.java 218ms 8.1ms 258.5MB 370ms 50ms graal/jvm 17.0.8
d 1.d 343ms 1.4ms 314.5MB 313ms 23ms dmd 2.109.1
java 1.java 415ms 13ms 342.0MB 200ms 287ms openjdk/zgc 21

nbody

Input: 5000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
d 2.d 361ms 0.5ms 2.9MB 350ms 0ms ldc2 1.39.0
d 1.d 361ms 1.0ms 2.9MB 350ms 0ms ldc2 1.39.0
java 1.java 441ms 0.5ms 44.8MB 473ms 17ms openjdk 21
java 1.java 443ms 0.5ms 48.2MB 473ms 20ms openjdk 23
java 1.java 448ms 4.1ms 87.2MB 477ms 33ms graal/jvm 17.0.8
java 1.java 561ms 5.7ms 44.9MB 477ms 143ms openjdk/zgc 21
d 1.d 680ms 2.2ms 4.6MB 670ms 0ms dmd 2.109.1
java 2.java 1229ms 2.7ms 655.9MB 1363ms 70ms openjdk 21
java 2.java 1235ms 8.6ms 756.2MB 1357ms 87ms openjdk 23
d 2.d 2009ms 2.2ms 4.6MB 2000ms 0ms dmd 2.109.1
java 2.java 3343ms 165ms 2671.0MB 1647ms 1893ms openjdk/zgc 21

Input: 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
d 1.d 39ms 0.5ms 2.9MB 30ms 0ms ldc2 1.39.0
d 2.d 39ms 0.7ms 2.9MB 30ms 0ms ldc2 1.39.0
d 1.d 71ms 0.9ms 4.8MB 63ms 0ms dmd 2.109.1
java 1.java 112ms 4.9ms 45.5MB 147ms 13ms openjdk 21
java 1.java 119ms 3.9ms 47.9MB 147ms 20ms openjdk 23
java 1.java 124ms 8.9ms 87.2MB 153ms 30ms graal/jvm 17.0.8
d 2.d 203ms 0.2ms 4.6MB 190ms 0ms dmd 2.109.1
java 1.java 239ms 6.7ms 46.6MB 147ms 147ms openjdk/zgc 21
java 2-m.java 296ms 11ms 364.7MB 430ms 60ms openjdk 21
java 2-m.java 307ms 7.8ms 389.9MB 443ms 60ms openjdk 23
java 2.java 699ms 7.2ms 532.4MB 463ms 420ms openjdk/zgc 21

nsieve

Input: 12

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
d 1.d 315ms 2.3ms 77.1MB 300ms 0ms dmd 2.109.1
d 1.d 352ms 4.4ms 43.7MB 333ms 3ms ldc2 1.39.0
java 1.java 395ms 4.3ms 114.7MB 450ms 10ms openjdk 21
java 1.java 396ms 5.8ms 118.3MB 430ms 27ms openjdk 23
java 1.java 584ms 3.9ms 112.7MB 483ms 167ms openjdk/zgc 21
java 1-m.java 629ms 35ms 236.3MB 907ms 80ms graal/jvm 17.0.8
java 2.java 772ms 4.5ms 57.5MB 827ms 13ms openjdk 21
java 2.java 777ms 5.0ms 60.4MB 827ms 20ms openjdk 23
d 2.d 821ms 4.2ms 47.5MB 800ms 10ms ldc2 1.39.0
java 2.java 842ms 1.8ms 53.1MB 773ms 140ms openjdk/zgc 21
d 2.d 1162ms 1.7ms 49.3MB 1143ms 3ms dmd 2.109.1
java 2-m.java 1369ms 54ms 201.6MB 2457ms 100ms graal/jvm 17.0.8

Input: 10

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
d 1.d 61ms 1.8ms 13.5MB 43ms 3ms ldc2 1.39.0
d 1.d 66ms 0.8ms 24.1MB 57ms 0ms dmd 2.109.1
java 1.java 153ms 3.0ms 68.3MB 190ms 27ms openjdk 23
java 1.java 160ms 6.4ms 64.9MB 213ms 23ms openjdk 21
d 2.d 203ms 0.8ms 15.7MB 190ms 0ms ldc2 1.39.0
java 1-m.java 234ms 25ms 148.6MB 330ms 50ms graal/jvm 17.0.8
java 2.java 259ms 7.1ms 49.9MB 333ms 7ms openjdk 21
java 2.java 260ms 4.7ms 50.6MB 310ms 17ms openjdk 23
java 1.java 283ms 1.4ms 61.3MB 203ms 150ms openjdk/zgc 21
d 2.d 291ms 1.3ms 17.6MB 277ms 3ms dmd 2.109.1
java 2.java 372ms 8.8ms 47.7MB 300ms 147ms openjdk/zgc 21
java 2-m.java 509ms 70ms 152.0MB 900ms 67ms graal/jvm 17.0.8

pidigits

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
d 1.d 2410ms 8.4ms 8.0MB 2367ms 387ms ldc2 1.39.0
java 1.java 3201ms 24ms 449.2MB 3637ms 93ms graal/jvm 17.0.8
java 1.java 3712ms 28ms 353.0MB 4583ms 120ms openjdk 21
java 1.java 3720ms 47ms 393.7MB 4540ms 113ms openjdk 23
d 1.d 4352ms 6.4ms 10.1MB 4243ms 487ms dmd 2.109.1
java 1.java timeout 0.0ms 1888.5MB 4683ms 1183ms openjdk/zgc 21

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
d 1.d 578ms 1.6ms 8.1MB 557ms 93ms ldc2 1.39.0
java 1-m.java 892ms 9.3ms 370.8MB 1247ms 97ms graal/jvm 17.0.8
java 1-m.java 979ms 26ms 350.8MB 1753ms 90ms openjdk 21
java 1-m.java 1036ms 15ms 389.8MB 1740ms 103ms openjdk 23
d 1.d 1041ms 11ms 10.2MB 1027ms 113ms dmd 2.109.1
java 1.java 2005ms 40ms 1329.4MB 1683ms 1067ms openjdk/zgc 21

regex-redux

Input: 2500000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
d 3.d 614ms 6.0ms 171.9MB 793ms 23ms ldc2 1.39.0
d 3.d 1345ms 56ms 174.6MB 1557ms 23ms dmd 2.109.1
java 3.java timeout 0.0ms 409.5MB 5413ms 93ms graal/jvm 17.0.8
java 3.java timeout 0.0ms 302.4MB 5333ms 47ms openjdk 21
java 3.java timeout 0.0ms 305.1MB 5333ms 53ms openjdk 23
java 3.java timeout 0.0ms 469.2MB 4950ms 310ms openjdk/zgc 21

Input: 250000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
d 3.d 71ms 3.4ms 25.9MB 83ms 0ms ldc2 1.39.0
d 3.d 145ms 6.4ms 26.5MB 153ms 7ms dmd 2.109.1
java 3-m.java 790ms 35ms 183.2MB 1160ms 67ms graal/jvm 17.0.8
java 3-m.java 807ms 10ms 132.0MB 1210ms 30ms openjdk 21
java 3-m.java 831ms 18ms 132.5MB 1220ms 40ms openjdk 23
java 3.java 947ms 6.5ms 135.2MB 1103ms 187ms openjdk/zgc 21

secp256k1

Input: 2000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
d 1.d 4798ms 38ms 3.9MB 4770ms 327ms ldc2 1.39.0
d 1.d timeout 0.0ms 6.6MB 5013ms 217ms dmd 2.109.1

Input: 500

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
d 1.d 1207ms 7.1ms 4.0MB 1160ms 110ms ldc2 1.39.0
d 1.d 2023ms 38ms 6.4MB 1990ms 113ms dmd 2.109.1

spectral-norm

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
java 2-m.java 1961ms 4.4ms 47.6MB 7457ms 33ms openjdk 21
java 2-m.java 1968ms 4.8ms 48.4MB 7473ms 27ms openjdk 23
java 2-m.java 2079ms 15ms 45.4MB 7450ms 147ms openjdk/zgc 21
java 2-m.java 2453ms 9.0ms 99.2MB 8760ms 27ms graal/jvm 17.0.8
d 1.d 3584ms 9.1ms 4.1MB 3570ms 0ms ldc2 1.39.0
d 1.d 3665ms 31ms 5.9MB 3653ms 0ms dmd 2.109.1

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
java 2-m.java 584ms 3.8ms 48.4MB 2047ms 17ms openjdk 23
java 2-m.java 584ms 2.4ms 47.5MB 2050ms 23ms openjdk 21
java 2-m.java 710ms 3.8ms 47.5MB 2070ms 140ms openjdk/zgc 21
java 2-m.java 739ms 5.6ms 96.7MB 2483ms 43ms graal/jvm 17.0.8
d 1.d 902ms 0.5ms 3.5MB 890ms 0ms ldc2 1.39.0
d 1.d 911ms 2.1ms 5.8MB 900ms 0ms dmd 2.109.1

Input: 2000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
d 1.d 227ms 0.4ms 3.0MB 220ms 0ms ldc2 1.39.0
d 1.d 235ms 1.0ms 4.9MB 220ms 0ms dmd 2.109.1
java 2-m.java 243ms 3.7ms 48.4MB 690ms 17ms openjdk 23
java 2-m.java 252ms 12ms 48.0MB 717ms 23ms openjdk 21
java 2-m.java 281ms 21ms 98.1MB 813ms 33ms graal/jvm 17.0.8
java 2-m.java 358ms 5.7ms 47.1MB 680ms 140ms openjdk/zgc 21