Dart VS Odin benchmarks

Current benchmark data was generated on Wed Sep 28 2022, full log can be found HERE

CONTRIBUTIONS are WELCOME!

[x86_64][2 cores] Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz (Model 106)

* -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
dart 1.dart 925ms 2.0ms 87.7MB 897ms 40ms dart/exe 2.18.1

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 1.dart 97ms 0.8ms 50.3MB 67ms 17ms dart/exe 2.18.1

coro-prime-sieve

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 1.dart timeout 0.0ms 0.0MB 0ms 0ms dart/exe 2.18.1

Input: 1000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 1.dart 574ms 7.4ms 17.7MB 563ms 10ms dart/exe 2.18.1

edigits

Input: 250001

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 1.dart 4905ms 5.6ms 22.9MB 4893ms 20ms dart/exe 2.18.1

Input: 100000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 1.dart 793ms 0.7ms 14.7MB 777ms 17ms dart/exe 2.18.1

fannkuch-redux

Input: 11

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 2.dart 4342ms 44ms 12.0MB 4327ms 0ms dart/exe 2.18.1

Input: 10

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 2.dart 351ms 1.7ms 11.1MB 333ms 0ms dart/exe 2.18.1

fasta

Input: 2500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 1.dart 543ms 1.0ms 16.6MB 520ms 0ms dart/exe 2.18.1

Input: 250000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 1.dart 63ms 0.7ms 15.9MB 50ms 0ms dart/exe 2.18.1

helloworld

Input: QwQ

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
odin 1.odin 1.7ms 0.5ms 1.6MB 0ms 0ms odin 2022
dart 1.dart 1007ms 0.6ms 13.4MB 0ms 0ms dart/exe 2.18.1

http-server

Input: 3000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 2.dart 1357ms 23ms 116.7MB 1150ms 807ms dart/exe 2.18.1
dart 1.dart 3823ms 78ms 104.7MB 1120ms 637ms dart/exe 2.18.1

Input: 500

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 2.dart 258ms 22ms 58.9MB 160ms 147ms dart/exe 2.18.1
dart 1.dart 1426ms 228ms 54.6MB 157ms 113ms dart/exe 2.18.1

json-serde

Input: sample 5000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 1.dart 258ms 2.7ms 57.5MB 233ms 17ms dart/exe 2.18.1

Input: canada 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 1.dart 2144ms 9.0ms 299.3MB 2200ms 113ms dart/exe 2.18.1

knucleotide

Input: 2500000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 3-m.dart 2126ms 41ms 254.3MB 3647ms 90ms dart/exe 2.18.1

Input: 250000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 3-m.dart 361ms 9.1ms 194.7MB 550ms 63ms dart/exe 2.18.1

lru

Input: 1000 1000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
odin 1.odin 182ms 0.9ms 1.9MB 170ms 0ms odin 2022
dart 2.dart 235ms 0.7ms 15.0MB 220ms 0ms dart/exe 2.18.1
dart 1.dart 1418ms 1.5ms 16.6MB 1403ms 3ms dart/exe 2.18.1

Input: 1000 3000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
odin 1.odin 542ms 0.4ms 1.9MB 530ms 0ms odin 2022
dart 2.dart 687ms 3.5ms 16.8MB 677ms 0ms dart/exe 2.18.1
dart 1.dart 4241ms 10ms 14.6MB 4230ms 0ms dart/exe 2.18.1

Input: 100 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
odin 1.odin 86ms 2.6ms 0.9MB 73ms 0ms odin 2022
dart 2.dart 110ms 0.7ms 16.7MB 97ms 0ms dart/exe 2.18.1
dart 1.dart 203ms 0.8ms 16.5MB 183ms 0ms dart/exe 2.18.1

merkletrees

Input: 17

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 1.dart 452ms 0.9ms 70.9MB 420ms 33ms dart/exe 2.18.1

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 1.dart 116ms 1.3ms 49.1MB 93ms 17ms dart/exe 2.18.1

nbody

Input: 5000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 3.dart 516ms 0.6ms 12.1MB 500ms 0ms dart/exe 2.18.1
odin 1.odin 2503ms 2.1ms 0.9MB 2490ms 0ms odin 2022

Input: 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 3.dart 59ms 0.3ms 11.8MB 43ms 0ms dart/exe 2.18.1
odin 1.odin 253ms 0.5ms 0.9MB 243ms 0ms odin 2022

pidigits

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 2.dart 1683ms 2.7ms 20.1MB 1667ms 53ms dart/exe 2.18.1

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 2.dart 429ms 4.6ms 20.8MB 410ms 37ms dart/exe 2.18.1

regex-redux

Input: 2500000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 1.dart timeout 0.0ms 0.0MB 0ms 0ms dart/exe 2.18.1

Input: 250000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 1.dart 799ms 1.0ms 56.2MB 770ms 20ms dart/exe 2.18.1

spectral-norm

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
odin 1.odin 4620ms 1.3ms 2.9MB 4603ms 0ms odin 2022
dart 1.dart timeout 0.0ms 0.0MB 0ms 0ms dart/exe 2.18.1

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
odin 1.odin 1158ms 1.0ms 2.4MB 1150ms 0ms odin 2022
dart 1.dart 1296ms 0.8ms 13.8MB 1280ms 0ms dart/exe 2.18.1

Input: 2000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
odin 1.odin 292ms 0.1ms 1.9MB 277ms 0ms odin 2022
dart 1.dart 331ms 1.8ms 12.1MB 317ms 0ms dart/exe 2.18.1