Dart Versus Java benchmarks

Current benchmark data was generated on Sat Nov 27 2021, full log can be found HERE

CONTRIBUTIONS are WELCOME!

binarytrees

Input: 18

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
java 2.java 668ms 11ms 492.7MB 613ms 133ms openjdk/parallelgc 17.0.1
java 2.java 670ms 2.4ms 407.3MB 650ms 103ms openjdk 18
java 2.java 736ms 8.5ms 406.3MB 677ms 153ms openjdk 17.0.1
dart 4.dart 836ms 6.1ms 167.0MB 1230ms 163ms dart 2.14.4
java 2.java 1054ms 14ms 679.6MB 763ms 197ms graal/jvm 17.0.1
java 2.java 1315ms 39ms 1106.5MB 847ms 677ms openjdk/zgc 17.0.1
java 2.java 1406ms 3.7ms 298.2MB 1273ms 120ms graal/native 21.3.0

Input: 14

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
dart 4.dart 65ms 7.5ms 52.3MB 53ms 20ms dart 2.14.4
java 2.java 104ms 2.7ms 69.2MB 103ms 20ms openjdk/parallelgc 17.0.1
java 2.java 108ms 14ms 129.2MB 40ms 47ms graal/native 21.3.0
java 2.java 109ms 3.2ms 89.7MB 93ms 20ms openjdk 17.0.1
java 2.java 139ms 52ms 88.1MB 100ms 20ms openjdk 18
java 2.java 211ms 27ms 138.5MB 113ms 100ms openjdk/zgc 17.0.1
java 2.java 477ms 28ms 142.7MB 153ms 53ms graal/jvm 17.0.1

coro-prime-sieve

Input: 1000

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
java 1.java 965ms 161ms 111.0MB 1447ms 50ms loom 18
dart 1.dart 1380ms 8.5ms 211.3MB 1197ms 207ms dart 2.14.4

edigits

Input: 100000

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
java 1.java 362ms 12ms 168.2MB 267ms 77ms graal/native 21.3.0
java 1.java 503ms 48ms 121.7MB 723ms 63ms openjdk 17.0.1
java 1.java 505ms 39ms 110.5MB 670ms 60ms openjdk 18
java 1.java 547ms 44ms 108.5MB 757ms 77ms openjdk/parallelgc 17.0.1
java 1.java 641ms 15ms 212.9MB 800ms 187ms openjdk/zgc 17.0.1
java 1.java 844ms 23ms 252.9MB 680ms 120ms graal/jvm 17.0.1
dart 1.dart 1832ms 8.1ms 47.7MB 1793ms 27ms dart 2.14.4

fannkuch-redux

Input: 11

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
java 1.java 1458ms 9.4ms 37.7MB 2780ms 7ms openjdk 17.0.1
java 1.java 1488ms 2.8ms 38.3MB 2840ms 13ms openjdk/parallelgc 17.0.1
java 1.java 1565ms 77ms 37.7MB 3000ms 17ms openjdk 18
java 1.java 1573ms 19ms 37.8MB 2917ms 57ms openjdk/zgc 17.0.1
java 1.java 1599ms 51ms 107.8MB 3023ms 27ms graal/jvm 17.0.1
java 1.java 1926ms 0.7ms 9.8MB 3787ms 0ms graal/native 21.3.0
dart 2.dart 4470ms 2.7ms 12.0MB 4450ms 0ms dart 2.14.4

Input: 10

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
java 1.java 182ms 18ms 9.6MB 320ms 3ms graal/native 21.3.0
java 1.java 213ms 2.8ms 38.0MB 333ms 7ms openjdk 17.0.1
java 1.java 214ms 8.0ms 39.2MB 327ms 13ms openjdk/parallelgc 17.0.1
java 1.java 232ms 2.7ms 36.9MB 360ms 10ms openjdk 18
java 1.java 271ms 8.6ms 38.2MB 350ms 57ms openjdk/zgc 17.0.1
dart 2.dart 362ms 6.7ms 14.0MB 343ms 0ms dart 2.14.4
java 1.java 580ms 36ms 90.3MB 427ms 27ms graal/jvm 17.0.1

fasta

Input: 2500000

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
java 4.java 475ms 16ms 5.8MB 397ms 13ms graal/native 21.3.0
java 4.java 492ms 12ms 38.3MB 450ms 20ms openjdk 17.0.1
dart 1.dart 503ms 9.6ms 22.2MB 460ms 10ms dart 2.14.4
java 4.java 522ms 6.6ms 38.5MB 473ms 7ms openjdk/parallelgc 17.0.1
java 4.java 535ms 38ms 36.6MB 463ms 23ms openjdk 18
java 4.java 570ms 3.1ms 37.1MB 477ms 70ms openjdk/zgc 17.0.1
java 4.java 990ms 45ms 168.2MB 780ms 77ms graal/jvm 17.0.1

Input: 250000

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
java 4.java 54ms 14ms 5.8MB 33ms 0ms graal/native 21.3.0
dart 1.dart 70ms 12ms 14.3MB 47ms 0ms dart 2.14.4
java 4.java 118ms 9.4ms 36.6MB 113ms 13ms openjdk 18
java 4.java 120ms 9.3ms 37.4MB 100ms 17ms openjdk 17.0.1
java 4.java 122ms 2.2ms 36.9MB 120ms 13ms openjdk/parallelgc 17.0.1
java 4.java 166ms 1.8ms 36.1MB 123ms 57ms openjdk/zgc 17.0.1
java 4.java 480ms 8.0ms 88.1MB 200ms 33ms graal/jvm 17.0.1

helloworld

Input: QwQ

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
java 1.java 8.0ms 11ms 6.1MB 0ms 0ms graal/native 21.3.0
dart 1.dart 8.4ms 2.3ms 14.0MB 0ms 0ms dart 2.14.4
java 1.java 48ms 1.9ms 34.6MB 28ms 8ms openjdk 17.0.1
java 1.java 50ms 1.5ms 36.4MB 30ms 10ms loom 18
java 1.java 52ms 3.5ms 33.2MB 26ms 14ms openjdk 18
java 1.java 55ms 1.5ms 35.1MB 42ms 10ms openjdk/parallelgc 17.0.1
java 1.java 73ms 3.4ms 52.6MB 70ms 10ms graal/jvm 17.0.1
java 1.java 104ms 1.7ms 36.2MB 40ms 60ms openjdk/zgc 17.0.1

http-server

Input: 3000

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
dart 1.dart 4020ms 6.0ms 106.4MB 1357ms 697ms dart 2.14.4

Input: 500

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
dart 1.dart 1684ms 306ms 57.9MB 190ms 127ms dart 2.14.4

json-serde

Input: sample 5000

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
dart 1.dart 293ms 8.7ms 64.5MB 270ms 13ms dart 2.14.4

Input: canada 15

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
dart 1.dart 2680ms 570ms 242.8MB 2353ms 157ms dart 2.14.4

mandelbrot

Input: 8000

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
java 4.java 2058ms 8.0ms 50.3MB 3927ms 23ms openjdk 17.0.1
java 4.java 2062ms 8.5ms 50.7MB 3950ms 7ms openjdk 18
java 4.java 2070ms 12ms 50.0MB 3960ms 17ms openjdk/parallelgc 17.0.1
java 4.java 2116ms 4.9ms 16.1MB 4097ms 0ms graal/native 21.3.0
java 4.java 2140ms 6.3ms 50.1MB 3977ms 67ms openjdk/zgc 17.0.1
java 4.java 2248ms 16ms 129.0MB 4270ms 43ms graal/jvm 17.0.1
dart 2.dart 4357ms 541ms 53.0MB 7193ms 20ms dart 2.14.4

Input: 1000

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
java 4.java 53ms 26ms 11.0MB 60ms 0ms graal/native 21.3.0
dart 2.dart 77ms 7.5ms 16.6MB 113ms 0ms dart 2.14.4
java 4.java 157ms 11ms 41.6MB 213ms 3ms openjdk 18
java 4.java 160ms 6.0ms 42.5MB 200ms 13ms openjdk/parallelgc 17.0.1
java 4.java 161ms 7.8ms 42.0MB 213ms 10ms openjdk 17.0.1
java 4.java 208ms 5.4ms 40.3MB 223ms 60ms openjdk/zgc 17.0.1
java 4.java 522ms 14ms 96.5MB 280ms 43ms graal/jvm 17.0.1

nbody

Input: 5000000

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
java 1.java 586ms 1.1ms 9.4MB 577ms 0ms graal/native 21.3.0
java 1.java 648ms 1.5ms 37.2MB 647ms 13ms openjdk/parallelgc 17.0.1
java 1.java 652ms 2.3ms 39.0MB 647ms 10ms openjdk 18
java 1.java 654ms 1.8ms 38.4MB 643ms 17ms openjdk 17.0.1
java 1.java 732ms 7.0ms 38.0MB 690ms 57ms openjdk/zgc 17.0.1
java 1.java 977ms 11ms 84.0MB 697ms 33ms graal/jvm 17.0.1
dart 3.dart 1033ms 26ms 13.9MB 1017ms 0ms dart 2.14.4

Input: 500000

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
java 1.java 62ms 0.3ms 9.4MB 50ms 0ms graal/native 21.3.0
dart 3.dart 114ms 1.1ms 13.9MB 100ms 0ms dart 2.14.4
java 1.java 124ms 1.1ms 38.7MB 120ms 10ms openjdk 17.0.1
java 1.java 126ms 1.4ms 37.4MB 113ms 17ms openjdk 18
java 1.java 134ms 0.7ms 37.1MB 130ms 13ms openjdk/parallelgc 17.0.1
java 1.java 190ms 8.2ms 38.0MB 143ms 60ms openjdk/zgc 17.0.1
java 1.java 468ms 0.4ms 85.3MB 203ms 23ms graal/jvm 17.0.1

Input: 100000

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
java 1.java 26ms 19ms 9.4MB 10ms 0ms graal/native 21.3.0
dart 3.dart 32ms 8.2ms 14.0MB 23ms 0ms dart 2.14.4
java 1.java 78ms 3.5ms 38.8MB 70ms 13ms openjdk 17.0.1
java 1.java 81ms 3.7ms 37.4MB 70ms 13ms openjdk 18
java 1.java 88ms 1.3ms 37.2MB 83ms 13ms openjdk/parallelgc 17.0.1
java 1.java 137ms 3.3ms 39.9MB 93ms 53ms openjdk/zgc 17.0.1
java 1.java 421ms 6.4ms 69.5MB 120ms 23ms graal/jvm 17.0.1

pidigits

Input: 8000

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
dart 2.dart 2638ms 592ms 20.1MB 1920ms 53ms dart 2.14.4

Input: 4000

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
dart 2.dart 1473ms 7.9ms 22.2MB 440ms 17ms dart 2.14.4
java 1.java 1619ms 86ms 209.4MB 1733ms 93ms openjdk 18
java 1.java 1633ms 57ms 628.4MB 1580ms 177ms openjdk/parallelgc 17.0.1
java 1.java 1684ms 44ms 172.0MB 1700ms 97ms openjdk 17.0.1
java 1.java 1763ms 42ms 434.4MB 1813ms 183ms graal/jvm 17.0.1
java 1.java 2002ms 26ms 263.0MB 1823ms 140ms graal/native 21.3.0
java 1.java 2237ms 31ms 1074.3MB 1753ms 667ms openjdk/zgc 17.0.1

Input: 1000

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
dart 2.dart 40ms 0.9ms 22.2MB 23ms 3ms dart 2.14.4
java 1.java 210ms 7.9ms 157.0MB 93ms 73ms graal/native 21.3.0
java 1.java 291ms 55ms 106.0MB 297ms 43ms openjdk 18
java 1.java 318ms 30ms 99.7MB 350ms 33ms openjdk/parallelgc 17.0.1
java 1.java 394ms 20ms 190.4MB 327ms 153ms openjdk/zgc 17.0.1
java 1.java 406ms 48ms 109.3MB 410ms 40ms openjdk 17.0.1
java 1.java 710ms 3.4ms 218.8MB 390ms 77ms graal/jvm 17.0.1

spectral-norm

Input: 4000

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
java 2.java 906ms 4.3ms 42.0MB 1677ms 20ms openjdk/parallelgc 17.0.1
java 2.java 1262ms 17ms 104.2MB 2297ms 37ms graal/jvm 17.0.1
dart 1.dart 1300ms 1.6ms 13.8MB 1287ms 0ms dart 2.14.4
java 2.java 1411ms 19ms 40.2MB 2570ms 70ms openjdk/zgc 17.0.1
java 2.java 1468ms 26ms 38.4MB 2777ms 13ms openjdk 17.0.1
java 2.java 2038ms 129ms 37.4MB 3900ms 10ms openjdk 18
java 2.java 2917ms 116ms 10.0MB 5577ms 0ms graal/native 21.3.0

Input: 1000

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
dart 1.dart 92ms 6.1ms 12.3MB 77ms 0ms dart 2.14.4
java 2.java 163ms 12ms 39.5MB 220ms 17ms openjdk/parallelgc 17.0.1
java 2.java 198ms 15ms 9.7MB 340ms 0ms graal/native 21.3.0
java 2.java 200ms 6.8ms 38.8MB 283ms 13ms openjdk 17.0.1
java 2.java 229ms 4.2ms 37.1MB 350ms 7ms openjdk 18
java 2.java 255ms 18ms 38.4MB 300ms 60ms openjdk/zgc 17.0.1
java 2.java 518ms 19ms 90.2MB 280ms 37ms graal/jvm 17.0.1