Dart Versus Rust 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
rust 2.rs 239ms 2.1ms 26.0MB 423ms 3ms rustc 1.56.1
rust 1.rs 770ms 2.3ms 18.0MB 750ms 3ms rustc 1.56.1
dart 4.dart 836ms 6.1ms 167.0MB 1230ms 163ms dart 2.14.4
rust 4.rs 1797ms 14ms 33.8MB 1780ms 3ms rustc 1.56.1
rust 3.rs 1928ms 46ms 49.8MB 1900ms 17ms rustc 1.56.1

Input: 14

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
rust 2.rs 15ms 0.4ms 3.7MB 17ms 0ms rustc 1.56.1
rust 1.rs 38ms 0.9ms 2.8MB 30ms 0ms rustc 1.56.1
dart 4.dart 65ms 7.5ms 52.3MB 53ms 20ms dart 2.14.4
rust 4.rs 82ms 0.6ms 3.9MB 73ms 0ms rustc 1.56.1
rust 3.rs 84ms 0.6ms 5.0MB 70ms 0ms rustc 1.56.1

coro-prime-sieve

Input: 1000

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
rust 3.rs 139ms 17ms 3.2MB 103ms 3ms rustc 1.56.1
rust 5.rs 168ms 23ms 2.9MB 190ms 10ms rustc 1.56.1
rust 2.rs 183ms 15ms 3.1MB 210ms 10ms rustc 1.56.1
rust 4.rs 216ms 5.0ms 2.8MB 187ms 7ms rustc 1.56.1
rust 1.rs 258ms 3.9ms 2.9MB 347ms 3ms rustc 1.56.1
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
rust 1.rs 64ms 11ms 3.0MB 37ms 3ms rustc 1.56.1
rust 2.rs 119ms 6.1ms 3.2MB 97ms 3ms rustc 1.56.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
rust 5.rs 1237ms 7.5ms 0.7MB 2363ms 0ms rustc 1.56.1
rust 2.rs 2852ms 0.8ms 0.7MB 2837ms 3ms rustc 1.56.1
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
rust 5.rs 109ms 0.3ms 0.6MB 190ms 0ms rustc 1.56.1
rust 2.rs 240ms 1.2ms 0.7MB 230ms 0ms rustc 1.56.1
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
rust 5.rs 598ms 49ms 1.3MB 507ms 13ms rustc 1.56.1
rust 1.rs 2858ms 116ms 0.7MB 373ms 767ms rustc 1.56.1

Input: 250000

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
rust 5.rs 59ms 8.2ms 1.4MB 43ms 0ms rustc 1.56.1
dart 1.dart 70ms 12ms 14.3MB 47ms 0ms dart 2.14.4
rust 1.rs 426ms 83ms 0.7MB 40ms 60ms rustc 1.56.1

helloworld

Input: QwQ

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
rust 1.rs 2.4ms 0.8ms 0.7MB 0ms 0ms rustc 1.58.0-nightly
rust 1.rs 3.3ms 2.1ms 1.9MB 0ms 0ms rustc 1.56.1
dart 1.dart 8.4ms 2.3ms 14.0MB 0ms 0ms dart 2.14.4

http-server

Input: 3000

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
rust 1.rs 152ms 10ms 19.3MB 97ms 93ms rustc 1.56.1
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
rust 1.rs 77ms 17ms 16.7MB 30ms 27ms rustc 1.56.1
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
rust 1.rs 130ms 0.9ms 75.4MB 83ms 30ms rustc 1.56.1
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
rust 1.rs 896ms 3.1ms 606.0MB 643ms 233ms rustc 1.56.1
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
rust 9.rs 477ms 0.8ms 9.6MB 890ms 3ms rustc 1.58.0-nightly
rust 8.rs 494ms 2.8ms 8.2MB 927ms 3ms rustc 1.56.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
rust 9.rs 11ms 0.6ms 2.1MB 10ms 0ms rustc 1.58.0-nightly
rust 8.rs 11ms 0.7ms 2.2MB 10ms 0ms rustc 1.56.1
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
rust 3.rs 298ms 2.0ms 0.7MB 290ms 0ms rustc 1.58.0-nightly
rust 7.rs 301ms 0.4ms 0.7MB 290ms 0ms rustc 1.56.1
rust 2.rs 393ms 5.1ms 0.7MB 387ms 0ms rustc 1.56.1
rust 1.rs 450ms 6.7ms 0.6MB 440ms 0ms rustc 1.56.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
rust 3.rs 32ms 0.8ms 0.7MB 23ms 0ms rustc 1.58.0-nightly
rust 7.rs 32ms 1.1ms 0.7MB 23ms 0ms rustc 1.56.1
rust 2.rs 42ms 0.9ms 0.7MB 30ms 0ms rustc 1.56.1
rust 1.rs 47ms 0.5ms 0.7MB 37ms 0ms rustc 1.56.1
dart 3.dart 114ms 1.1ms 13.9MB 100ms 0ms dart 2.14.4

Input: 100000

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
rust 3.rs 8.2ms 1.0ms 0.7MB 0ms 0ms rustc 1.58.0-nightly
rust 2.rs 9.8ms 0.6ms 0.7MB 0ms 0ms rustc 1.56.1
rust 7.rs 10ms 4.4ms 0.7MB 0ms 0ms rustc 1.56.1
rust 1.rs 11ms 0.8ms 0.7MB 0ms 0ms rustc 1.56.1
dart 3.dart 32ms 8.2ms 14.0MB 23ms 0ms dart 2.14.4

pidigits

Input: 8000

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
rust 1.rs 1588ms 6.2ms 2.9MB 1413ms 160ms rustc 1.56.1
rust 2.rs 1611ms 2.5ms 2.9MB 1547ms 53ms rustc 1.56.1
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
rust 1.rs 338ms 5.5ms 2.5MB 303ms 10ms rustc 1.56.1
rust 2.rs 367ms 4.3ms 2.6MB 347ms 0ms rustc 1.56.1
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
rust 2.rs 25ms 1.6ms 2.2MB 17ms 0ms rustc 1.56.1
rust 1.rs 26ms 1.0ms 2.3MB 13ms 0ms rustc 1.56.1
dart 2.dart 40ms 0.9ms 22.2MB 23ms 3ms dart 2.14.4

spectral-norm

Input: 4000

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
rust 7.rs 229ms 1.4ms 2.4MB 427ms 0ms rustc 1.56.1
rust 3.rs 489ms 2.2ms 2.1MB 933ms 0ms rustc 1.56.1
rust 5.rs 494ms 2.0ms 2.3MB 940ms 0ms rustc 1.56.1
dart 1.dart 1300ms 1.6ms 13.8MB 1287ms 0ms dart 2.14.4
rust 2.rs 1458ms 1.1ms 0.7MB 1450ms 0ms rustc 1.56.1
rust 8.rs 3846ms 3.8ms 2.4MB 7530ms 0ms rustc 1.58.0-nightly

Input: 1000

lang code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
rust 7.rs 21ms 2.8ms 0.7MB 23ms 0ms rustc 1.56.1
rust 5.rs 36ms 1.1ms 0.7MB 57ms 0ms rustc 1.56.1
rust 3.rs 41ms 5.5ms 0.7MB 60ms 0ms rustc 1.56.1
dart 1.dart 92ms 6.1ms 12.3MB 77ms 0ms dart 2.14.4
rust 2.rs 94ms 0.7ms 0.7MB 87ms 0ms rustc 1.56.1
rust 8.rs 249ms 0.2ms 0.7MB 470ms 0ms rustc 1.58.0-nightly