Dart Versus Javascript 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
dart 4.dart 836ms 6.1ms 167.0MB 1230ms 163ms dart 2.14.4
javascript 1.js 2071ms 8.7ms 345.3MB 3100ms 403ms node 16.13.0
javascript 1.js 2101ms 9.1ms 331.2MB 3110ms 417ms node 17.1.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
javascript 1.js 395ms 59ms 101.9MB 483ms 83ms node 16.13.0
javascript 1.js 412ms 65ms 104.5MB 500ms 77ms node 17.1.0

coro-prime-sieve

Input: 1000

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
javascript 1.js 247ms 27ms 53.2MB 200ms 20ms node 16.13.0
javascript 1.js 253ms 20ms 55.2MB 210ms 23ms node 17.1.0
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
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
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
dart 2.dart 362ms 6.7ms 14.0MB 343ms 0ms dart 2.14.4

fasta

Input: 2500000

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
dart 1.dart 503ms 9.6ms 22.2MB 460ms 10ms dart 2.14.4

Input: 250000

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
dart 1.dart 70ms 12ms 14.3MB 47ms 0ms dart 2.14.4

helloworld

Input: QwQ

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
dart 1.dart 8.4ms 2.3ms 14.0MB 0ms 0ms dart 2.14.4
javascript 1.js 42ms 1.3ms 32.6MB 32ms 2ms node 16.13.0
javascript 1.js 49ms 1.0ms 35.6MB 34ms 4ms node 17.1.0
javascript 1.js 247ms 8.8ms 279.5MB 330ms 94ms node/graal 14.17.6

http-server

Input: 3000

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
javascript 1.js 3901ms 191ms 149.8MB 1737ms 373ms node 17.1.0
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
javascript 1.js 429ms 6.9ms 66.9MB 360ms 83ms node 17.1.0
javascript 1.js 442ms 9.1ms 63.6MB 377ms 80ms node 16.13.0
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
javascript 1.js 157ms 2.3ms 57.3MB 137ms 13ms node 16.13.0
javascript 1.js 161ms 1.7ms 57.9MB 140ms 13ms node 17.1.0
dart 1.dart 293ms 8.7ms 64.5MB 270ms 13ms dart 2.14.4
javascript 1.js 859ms 2.5ms 684.8MB 1233ms 273ms node/graal 14.17.6

Input: canada 15

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
javascript 1.js 1091ms 11ms 221.4MB 1077ms 97ms node 16.13.0
javascript 1.js 1096ms 7.3ms 224.2MB 1093ms 83ms node 17.1.0
dart 1.dart 2680ms 570ms 242.8MB 2353ms 157ms dart 2.14.4
javascript 1.js 4009ms 18ms 998.9MB 4417ms 430ms node/graal 14.17.6

mandelbrot

Input: 8000

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
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
dart 2.dart 77ms 7.5ms 16.6MB 113ms 0ms dart 2.14.4

nbody

Input: 5000000

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
javascript 6.js 751ms 6.8ms 37.8MB 737ms 3ms node 16.13.0
javascript 6.js 760ms 7.8ms 41.3MB 743ms 3ms node 17.1.0
dart 3.dart 1033ms 26ms 13.9MB 1017ms 0ms dart 2.14.4
javascript 6.js 4738ms 28ms 684.5MB 6827ms 310ms node/graal 14.17.6

Input: 500000

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
dart 3.dart 114ms 1.1ms 13.9MB 100ms 0ms dart 2.14.4
javascript 6.js 123ms 3.1ms 37.9MB 110ms 7ms node 16.13.0
javascript 6.js 131ms 2.3ms 41.2MB 113ms 7ms node 17.1.0
javascript 6.js 1898ms 9.0ms 680.0MB 3343ms 267ms node/graal 14.17.6

Input: 100000

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
dart 3.dart 32ms 8.2ms 14.0MB 23ms 0ms dart 2.14.4
javascript 6.js 66ms 0.6ms 38.0MB 50ms 7ms node 16.13.0
javascript 6.js 77ms 3.4ms 41.3MB 63ms 0ms node 17.1.0
javascript 6.js 928ms 5.4ms 656.2MB 1447ms 247ms node/graal 14.17.6

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
javascript 3.js 1618ms 2.0ms 52.8MB 1560ms 37ms node 16.13.0
javascript 3.js 1644ms 87ms 56.6MB 1547ms 33ms node 17.1.0

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
javascript 3.js 127ms 7.9ms 37.0MB 100ms 7ms node 16.13.0
javascript 3.js 132ms 4.3ms 40.4MB 107ms 13ms node 17.1.0

spectral-norm

Input: 4000

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
javascript 6.js 854ms 4.0ms 57.9MB 1520ms 37ms node 17.1.0
javascript 6.js 895ms 9.7ms 53.9MB 1597ms 23ms node 16.13.0
dart 1.dart 1300ms 1.6ms 13.8MB 1287ms 0ms dart 2.14.4

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
javascript 6.js 223ms 5.4ms 53.6MB 280ms 20ms node 16.13.0
javascript 6.js 227ms 6.1ms 56.2MB 300ms 10ms node 17.1.0
javascript 6.js 3325ms 109ms 750.3MB 5623ms 343ms node/graal 14.17.6