Dart VS OCaml benchmarks

Current benchmark data was generated on Mon Mar 31 2025, full log can be found HERE

CONTRIBUTIONS are WELCOME!

[x86_64][4 cores] AMD EPYC 7763 64-Core Processor (Model 1)

* -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 694ms 4.4ms 80.7MB 657ms 40ms dart/exe 3.7.2
ocaml 1.ml 2992ms 15ms 157.1MB 2910ms 70ms ocaml 5.3.0

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 1.dart 74ms 0.1ms 42.6MB 50ms 17ms dart/exe 3.7.2
ocaml 1.ml 219ms 1.1ms 19.2MB 203ms 0ms ocaml 5.3.0

coro-prime-sieve

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 1-m.dart 1665ms 2884ms 19.1MB 5463ms 67ms dart/exe 3.7.2

Input: 1000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 1.dart 347ms 4.8ms 10.5MB 347ms 10ms dart/exe 3.7.2

edigits

Input: 250001

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 1.dart 3684ms 4.5ms 18.0MB 3650ms 30ms dart/exe 3.7.2

Input: 100000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 1.dart 598ms 3.5ms 10.0MB 577ms 10ms dart/exe 3.7.2

fannkuch-redux

Input: 11

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 2.dart 2741ms 18ms 6.3MB 2730ms 0ms dart/exe 3.7.2
ocaml 2.ml 2927ms 11ms 4.9MB 2917ms 0ms ocaml 5.3.0

Input: 10

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 2.dart 222ms 1.7ms 6.3MB 210ms 0ms dart/exe 3.7.2
ocaml 2.ml 246ms 1.5ms 5.1MB 240ms 0ms ocaml 5.3.0

fasta

Input: 2500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
ocaml 6.ml 346ms 1.3ms 24.8MB 333ms 0ms ocaml 5.3.0
dart 1.dart 360ms 2.9ms 8.6MB 350ms 0ms dart/exe 3.7.2

Input: 250000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
ocaml 6.ml 38ms 0.4ms 7.3MB 30ms 0ms ocaml 5.3.0
dart 1.dart 42ms 0.3ms 8.6MB 30ms 0ms dart/exe 3.7.2

helloworld

Input: QwQ

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
ocaml 1.ml 1.9ms 0.1ms 5.1MB 0ms 0ms ocaml 5.3.0
dart 1.dart 3.8ms 0.3ms 5.3MB 0ms 0ms dart/exe 3.7.2

http-server

Input: 3000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 2-m.dart 1395ms 29ms 95.6MB 1307ms 1560ms dart/exe 3.7.2
dart 1.dart 4512ms 421ms 95.6MB 1510ms 1877ms dart/exe 3.7.2

Input: 500

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 2-m.dart 263ms 8.2ms 50.0MB 173ms 297ms dart/exe 3.7.2
dart 1.dart 1960ms 614ms 50.5MB 170ms 270ms dart/exe 3.7.2

json-serde

Input: sample 5000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 1.dart 164ms 1.6ms 53.4MB 140ms 13ms dart/exe 3.7.2

Input: canada 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 1.dart 1505ms 18ms 206.4MB 1730ms 110ms dart/exe 3.7.2

knucleotide

Input: 2500000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 3-m.dart 1118ms 24ms 274.4MB 3333ms 110ms dart/exe 3.7.2

Input: 250000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 3-m.dart 201ms 4.8ms 186.6MB 523ms 47ms dart/exe 3.7.2

lru

Input: 1000 1000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 2.dart 170ms 1.9ms 9.4MB 160ms 0ms dart/exe 3.7.2
ocaml 1.ml 184ms 5.4ms 6.4MB 173ms 0ms ocaml 5.3.0
dart 1.dart 492ms 1.7ms 9.1MB 480ms 0ms dart/exe 3.7.2

Input: 1000 3000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 2.dart 484ms 3.7ms 9.3MB 470ms 0ms dart/exe 3.7.2
ocaml 1.ml 537ms 29ms 6.6MB 523ms 0ms ocaml 5.3.0
dart 1.dart 1462ms 8.8ms 9.3MB 1447ms 3ms dart/exe 3.7.2

Input: 100 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 2.dart 77ms 1.6ms 8.9MB 70ms 0ms dart/exe 3.7.2
ocaml 1.ml 78ms 1.3ms 5.9MB 70ms 0ms ocaml 5.3.0
dart 1.dart 110ms 0.5ms 8.8MB 100ms 0ms dart/exe 3.7.2

merkletrees

Input: 17

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 1.dart 325ms 2.6ms 63.8MB 300ms 27ms dart/exe 3.7.2
ocaml 1.ml 1092ms 5.1ms 70.2MB 1047ms 30ms ocaml 5.3.0
ocaml 2.ml 2145ms 35ms 91.7MB 2087ms 40ms ocaml 5.3.0

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 1.dart 84ms 0.4ms 43.8MB 60ms 13ms dart/exe 3.7.2
ocaml 1.ml 152ms 1.5ms 21.6MB 137ms 0ms ocaml 5.3.0
ocaml 2.ml 366ms 3.1ms 27.7MB 343ms 10ms ocaml 5.3.0

nbody

Input: 5000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
ocaml 1.ml 373ms 2.2ms 5.2MB 360ms 0ms ocaml 5.3.0
dart 3.dart 408ms 3.7ms 6.1MB 400ms 0ms dart/exe 3.7.2

Input: 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
ocaml 1.ml 42ms 0.9ms 5.2MB 30ms 0ms ocaml 5.3.0
dart 3.dart 45ms 0.2ms 6.4MB 33ms 0ms dart/exe 3.7.2

pidigits

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 2.dart 1354ms 5.1ms 14.8MB 1330ms 33ms dart/exe 3.7.2

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 2.dart 343ms 7.4ms 14.8MB 327ms 10ms dart/exe 3.7.2

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 188.2MB 4983ms 50ms dart/exe 3.7.2
ocaml 2.ml timeout 0.0ms 462.9MB 4817ms 167ms ocaml 5.3.0

Input: 250000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
ocaml 2.ml 549ms 10ms 57.1MB 513ms 23ms ocaml 5.3.0
dart 1.dart 570ms 22ms 43.2MB 550ms 10ms dart/exe 3.7.2

spectral-norm

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 1.dart 3773ms 14ms 6.4MB 3763ms 0ms dart/exe 3.7.2
dart 2.dart 4338ms 5.9ms 6.4MB 4327ms 0ms dart/exe 3.7.2
ocaml 2.ml 4556ms 14ms 6.4MB 4543ms 0ms ocaml 5.3.0

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 1.dart 944ms 2.2ms 6.3MB 930ms 0ms dart/exe 3.7.2
dart 2.dart 1088ms 11ms 6.1MB 1080ms 0ms dart/exe 3.7.2
ocaml 2.ml 1140ms 6.4ms 6.1MB 1130ms 0ms ocaml 5.3.0

Input: 2000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 1.dart 241ms 2.5ms 6.3MB 230ms 0ms dart/exe 3.7.2
dart 2.dart 285ms 8.1ms 6.3MB 273ms 0ms dart/exe 3.7.2
ocaml 2.ml 291ms 5.2ms 5.2MB 283ms 0ms ocaml 5.3.0