Dart Versus Wasm 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
wasm 1.rs 1004ms 17ms 25.7MB 983ms 7ms wasmedgec 0.8.2
wasm 1.rs 1086ms 8.1ms 33.0MB 1063ms 7ms wasmer/LLVM 2.0.0
wasm 1.rs 1202ms 8.3ms 52.5MB 1210ms 7ms node 14.18.1
wasm 1.rs 1224ms 8.8ms 25.0MB 1213ms 0ms wasmtime 0.31.0
wasm 1.rs 1338ms 15ms 46.7MB 1390ms 10ms deno 1.16.3
wasm 1.rs 1364ms 19ms 35.3MB 1343ms 3ms wasmer/Cranelift 2.0.0

Input: 14

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
wasm 1.rs 59ms 0.7ms 21.8MB 47ms 0ms wasmer/LLVM 2.0.0
wasm 1.rs 65ms 4.2ms 13.1MB 50ms 0ms wasmedgec 0.8.2
dart 4.dart 65ms 7.5ms 52.3MB 53ms 20ms dart 2.14.4
wasm 1.rs 90ms 30ms 29.2MB 90ms 3ms wasmer/Cranelift 2.0.0
wasm 1.rs 95ms 46ms 17.1MB 90ms 0ms wasmtime 0.31.0
wasm 1.rs 138ms 1.3ms 39.9MB 150ms 3ms node 14.18.1
wasm 1.rs 154ms 56ms 34.9MB 190ms 7ms deno 1.16.3

coro-prime-sieve

Input: 1000

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
wasm 3.rs 121ms 39ms 22.0MB 73ms 3ms wasmer/LLVM 2.0.0
wasm 3.rs 155ms 55ms 31.3MB 157ms 7ms wasmer/Cranelift 2.0.0
wasm 3.rs 158ms 34ms 11.5MB 100ms 3ms wasmtime 0.31.0
wasm 3.rs 197ms 0.9ms 41.6MB 223ms 10ms node 14.18.1
wasm 3.rs 315ms 42ms 36.8MB 317ms 10ms deno 1.16.3
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
wasm 1.rs 152ms 19ms 22.2MB 120ms 13ms wasmer/LLVM 2.0.0
wasm 1.rs 219ms 31ms 12.8MB 163ms 20ms wasmtime 0.31.0
wasm 1.rs 234ms 46ms 34.1MB 213ms 20ms wasmer/Cranelift 2.0.0
wasm 1.rs 290ms 1.4ms 46.7MB 313ms 23ms node 14.18.1
wasm 1.rs 312ms 51ms 39.8MB 413ms 27ms deno 1.16.3
wasm 1.rs 787ms 83ms 16.1MB 420ms 210ms wasmedgec 0.8.2
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
wasm 2.rs 2887ms 1.9ms 12.3MB 2870ms 0ms wasmedgec 0.8.2
wasm 2.rs 3278ms 37ms 39.6MB 3280ms 10ms node 14.18.1
wasm 2.rs 3283ms 2.1ms 21.0MB 3270ms 0ms wasmer/LLVM 2.0.0
wasm 2.rs 3357ms 4.2ms 10.8MB 3347ms 0ms wasmtime 0.31.0
wasm 2.rs 3407ms 2.2ms 21.7MB 3390ms 0ms wasmer/Cranelift 2.0.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
wasm 2.rs 253ms 1.0ms 12.2MB 240ms 0ms wasmedgec 0.8.2
wasm 2.rs 281ms 0.6ms 21.2MB 270ms 0ms wasmer/LLVM 2.0.0
wasm 2.rs 299ms 32ms 17.3MB 297ms 0ms wasmtime 0.31.0
wasm 2.rs 304ms 31ms 29.2MB 303ms 0ms wasmer/Cranelift 2.0.0
wasm 2.rs 342ms 0.6ms 40.2MB 353ms 7ms node 14.18.1
dart 2.dart 362ms 6.7ms 14.0MB 343ms 0ms dart 2.14.4
wasm 2.rs 576ms 45ms 34.8MB 610ms 13ms deno 1.16.3

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
wasm 1.rs 2878ms 81ms 21.4MB 613ms 677ms wasmer/LLVM 2.0.0
wasm 1.rs 2976ms 109ms 21.8MB 613ms 813ms wasmer/Cranelift 2.0.0
wasm 1.rs 3311ms 132ms 35.6MB 1033ms 890ms deno 1.16.3
wasm 1.rs 3359ms 347ms 11.0MB 853ms 947ms wasmtime 0.31.0
wasm 1.rs 3984ms 291ms 40.1MB 967ms 987ms node 14.18.1

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
wasm 1.rs 295ms 106ms 21.1MB 57ms 67ms wasmer/LLVM 2.0.0
wasm 1.rs 340ms 51ms 28.6MB 93ms 80ms wasmer/Cranelift 2.0.0
wasm 1.rs 354ms 69ms 16.0MB 123ms 70ms wasmtime 0.31.0
wasm 1.rs 395ms 44ms 39.6MB 197ms 80ms node 14.18.1
wasm 1.rs 506ms 18ms 35.5MB 220ms 107ms deno 1.16.3
wasm 1.rs 620ms 92ms 12.2MB 157ms 137ms wasmedgec 0.8.2

helloworld

Input: QwQ

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
wasm 1.rs 8.1ms 0.6ms 21.4MB 0ms 0ms wasmer/LLVM 2.0.0
dart 1.dart 8.4ms 2.3ms 14.0MB 0ms 0ms dart 2.14.4
wasm 1.rs 12ms 1.5ms 31.6MB 0ms 0ms wasm/graal 21.3.0
wasm 1.rs 14ms 1.7ms 12.0MB 0ms 0ms wasmedgec 0.8.2
wasm 1.rs 18ms 23ms 14.7MB 90ms 0ms wasmtime 0.31.0
wasm 1.rs 18ms 23ms 29.0MB 80ms 10ms wasmer/Cranelift 2.0.0
wasm 1.rs 30ms 0.9ms 32.2MB 18ms 4ms deno 1.16.3
wasm 1.rs 76ms 2.3ms 40.0MB 88ms 2ms node 14.18.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
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
wasm 2.rs 446ms 1.5ms 13.6MB 433ms 0ms wasmedgec 0.8.2
wasm 2.rs 462ms 2.8ms 21.0MB 450ms 0ms wasmer/LLVM 2.0.0
wasm 1.rs 480ms 7.3ms 13.5MB 467ms 0ms wasmedgec 0.8.2
wasm 1.rs 484ms 0.2ms 20.6MB 470ms 0ms wasmer/LLVM 2.0.0
wasm 1.rs 509ms 7.1ms 22.0MB 500ms 0ms wasmer/Cranelift 2.0.0
wasm 1.rs 513ms 0.2ms 11.2MB 500ms 0ms wasmtime 0.31.0
wasm 2.rs 536ms 12ms 22.0MB 523ms 0ms wasmer/Cranelift 2.0.0
wasm 2.rs 542ms 19ms 11.1MB 530ms 0ms wasmtime 0.31.0
wasm 2.rs 658ms 9.0ms 45.1MB 673ms 13ms node 14.18.1
wasm 1.rs 679ms 5.8ms 44.8MB 690ms 17ms node 14.18.1
wasm 2.rs 859ms 4.8ms 37.1MB 943ms 3ms deno 1.16.3
dart 3.dart 1033ms 26ms 13.9MB 1017ms 0ms dart 2.14.4
wasm 1.rs 1243ms 19ms 36.6MB 1323ms 10ms deno 1.16.3
wasm 1.rs 3986ms 30ms 131.1MB 4047ms 33ms wasm/graal 21.3.0
wasm 2.rs 4518ms 0.7ms 197.4MB 4737ms 73ms wasm/graal 21.3.0

Input: 500000

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
wasm 2.rs 53ms 0.1ms 20.8MB 43ms 0ms wasmer/LLVM 2.0.0
wasm 1.rs 56ms 0.9ms 20.8MB 43ms 0ms wasmer/LLVM 2.0.0
wasm 2.rs 58ms 0.9ms 13.9MB 47ms 0ms wasmedgec 0.8.2
wasm 1.rs 59ms 0.3ms 9.4MB 47ms 0ms wasmtime 0.31.0
wasm 1.rs 60ms 1.0ms 22.0MB 50ms 0ms wasmer/Cranelift 2.0.0
wasm 2.rs 62ms 1.9ms 21.9MB 50ms 0ms wasmer/Cranelift 2.0.0
wasm 1.rs 62ms 1.3ms 13.8MB 50ms 0ms wasmedgec 0.8.2
wasm 2.rs 63ms 0.6ms 11.2MB 57ms 0ms wasmtime 0.31.0
dart 3.dart 114ms 1.1ms 13.9MB 100ms 0ms dart 2.14.4
wasm 2.rs 115ms 0.7ms 37.3MB 173ms 13ms deno 1.16.3
wasm 2.rs 151ms 0.6ms 44.5MB 170ms 10ms node 14.18.1
wasm 1.rs 153ms 4.2ms 44.5MB 167ms 13ms node 14.18.1
wasm 1.rs 156ms 6.9ms 36.7MB 240ms 10ms deno 1.16.3
wasm 1.rs 706ms 1.6ms 131.5MB 803ms 33ms wasm/graal 21.3.0
wasm 2.rs 1110ms 0.7ms 199.6MB 1320ms 87ms wasm/graal 21.3.0

Input: 100000

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
wasm 2.rs 17ms 0.7ms 21.4MB 10ms 0ms wasmer/LLVM 2.0.0
wasm 1.rs 17ms 0.7ms 21.3MB 10ms 0ms wasmer/LLVM 2.0.0
wasm 1.rs 20ms 2.7ms 22.2MB 10ms 0ms wasmer/Cranelift 2.0.0
wasm 1.rs 21ms 0.8ms 9.5MB 10ms 0ms wasmtime 0.31.0
wasm 2.rs 21ms 3.1ms 9.4MB 10ms 0ms wasmtime 0.31.0
wasm 2.rs 22ms 2.9ms 22.0MB 10ms 0ms wasmer/Cranelift 2.0.0
wasm 2.rs 24ms 1.6ms 13.6MB 13ms 0ms wasmedgec 0.8.2
wasm 1.rs 24ms 1.7ms 13.6MB 10ms 0ms wasmedgec 0.8.2
dart 3.dart 32ms 8.2ms 14.0MB 23ms 0ms dart 2.14.4
wasm 2.rs 50ms 1.9ms 37.0MB 53ms 10ms deno 1.16.3
wasm 1.rs 59ms 3.5ms 36.9MB 60ms 13ms deno 1.16.3
wasm 1.rs 105ms 3.1ms 43.2MB 117ms 13ms node 14.18.1
wasm 2.rs 109ms 2.9ms 43.8MB 120ms 13ms node 14.18.1
wasm 1.rs 429ms 24ms 131.1MB 520ms 43ms wasm/graal 21.3.0
wasm 2.rs 807ms 1.5ms 197.5MB 1033ms 67ms wasm/graal 21.3.0

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
wasm 2.rs 3417ms 2.5ms 22.3MB 3397ms 0ms wasmer/LLVM 2.0.0
wasm 2.rs 3811ms 19ms 16.4MB 3637ms 140ms wasmedgec 0.8.2
wasm 2.rs 4111ms 70ms 48.5MB 4130ms 23ms node 14.18.1

Input: 4000

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
wasm 2.rs 810ms 2.3ms 21.9MB 790ms 0ms wasmer/LLVM 2.0.0
wasm 2.rs 1011ms 1.3ms 16.1MB 897ms 97ms wasmedgec 0.8.2
wasm 2.rs 1062ms 14ms 46.3MB 1087ms 13ms node 14.18.1
wasm 2.rs 1191ms 6.2ms 12.8MB 1170ms 0ms wasmtime 0.31.0
wasm 2.rs 1197ms 2.9ms 23.0MB 1183ms 0ms wasmer/Cranelift 2.0.0
wasm 2.rs 1436ms 0.4ms 40.2MB 1547ms 13ms deno 1.16.3
dart 2.dart 1473ms 7.9ms 22.2MB 440ms 17ms dart 2.14.4

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
wasm 2.rs 55ms 0.9ms 21.5MB 47ms 0ms wasmer/LLVM 2.0.0
wasm 2.rs 78ms 2.4ms 22.7MB 63ms 3ms wasmer/Cranelift 2.0.0
wasm 2.rs 83ms 3.0ms 10.6MB 70ms 0ms wasmtime 0.31.0
wasm 2.rs 113ms 1.8ms 16.0MB 80ms 13ms wasmedgec 0.8.2
wasm 2.rs 175ms 2.0ms 45.9MB 200ms 17ms node 14.18.1
wasm 2.rs 220ms 58ms 39.7MB 297ms 17ms deno 1.16.3

spectral-norm

Input: 4000

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
wasm 2.rs 866ms 0.4ms 21.7MB 853ms 0ms wasmer/LLVM 2.0.0
wasm 2.rs 876ms 3.5ms 14.0MB 860ms 0ms wasmedgec 0.8.2
wasm 2.rs 996ms 0.4ms 22.2MB 987ms 0ms wasmer/Cranelift 2.0.0
wasm 2.rs 1004ms 1.2ms 10.5MB 990ms 0ms wasmtime 0.31.0
wasm 2.rs 1181ms 4.3ms 45.5MB 1197ms 13ms node 14.18.1
wasm 2.rs 1191ms 20ms 37.2MB 1283ms 10ms deno 1.16.3
dart 1.dart 1300ms 1.6ms 13.8MB 1287ms 0ms dart 2.14.4
wasm 2.rs 3986ms 1.3ms 319.7MB 4687ms 133ms wasm/graal 21.3.0

Input: 1000

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
wasm 2.rs 62ms 0.7ms 22.7MB 50ms 0ms wasmer/LLVM 2.0.0
wasm 2.rs 72ms 4.2ms 14.1MB 57ms 0ms wasmedgec 0.8.2
dart 1.dart 92ms 6.1ms 12.3MB 77ms 0ms dart 2.14.4
wasm 2.rs 99ms 49ms 31.3MB 103ms 0ms wasmer/Cranelift 2.0.0
wasm 2.rs 100ms 48ms 17.9MB 110ms 0ms wasmtime 0.31.0
wasm 2.rs 163ms 2.9ms 44.9MB 183ms 7ms node 14.18.1
wasm 2.rs 186ms 60ms 37.2MB 250ms 10ms deno 1.16.3
wasm 2.rs 783ms 3.7ms 318.7MB 1237ms 130ms wasm/graal 21.3.0