Dart VS Haxe benchmarks

Current benchmark data was generated on Thu Dec 26 2024, 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 729ms 7.9ms 80.7MB 700ms 37ms dart/exe 3.6.0
haxe 1.hx 1329ms 13ms 144.0MB 1507ms 80ms haxe/cpp 4.3.6
haxe 2.hx 4520ms 68ms 495.3MB 5083ms 263ms haxe/cpp 4.3.6
haxe 1.hx timeout 0.0ms 50.6MB 5470ms 420ms haxe/hl/c 4.3.6
haxe 2.hx timeout 0.0ms 85.1MB 5047ms 677ms haxe/hl/c 4.3.6
haxe 1.hx timeout 0.0ms 52.4MB 7807ms 440ms haxe/hl/jit 1.14.0
haxe 2.hx timeout 0.0ms 132.9MB 7613ms 803ms haxe/hl/jit 1.14.0

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 1.dart 78ms 0.8ms 42.9MB 50ms 13ms dart/exe 3.6.0
haxe 1.hx 88ms 1.8ms 25.6MB 80ms 7ms haxe/cpp 4.3.6
haxe 2.hx 411ms 11ms 60.1MB 443ms 27ms haxe/cpp 4.3.6
haxe 1.hx 634ms 1.2ms 10.8MB 597ms 50ms haxe/hl/c 4.3.6
haxe 1.hx 667ms 8.2ms 13.2MB 720ms 60ms haxe/hl/jit 1.14.0
haxe 2.hx 914ms 3.6ms 15.5MB 807ms 147ms haxe/hl/c 4.3.6
haxe 2.hx 1039ms 32ms 27.0MB 1043ms 177ms haxe/hl/jit 1.14.0

coro-prime-sieve

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 1-m.dart 1652ms 2861ms 19.1MB 5583ms 77ms dart/exe 3.6.0

Input: 1000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 1.dart 343ms 1.4ms 10.3MB 343ms 20ms dart/exe 3.6.0

edigits

Input: 250001

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 1.dart 3563ms 22ms 18.0MB 3533ms 27ms dart/exe 3.6.0

Input: 100000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 1.dart 585ms 1.6ms 10.1MB 563ms 13ms dart/exe 3.6.0

fannkuch-redux

Input: 11

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 2.dart 2748ms 14ms 6.1MB 2737ms 0ms dart/exe 3.6.0

Input: 10

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 2.dart 227ms 3.7ms 6.1MB 217ms 0ms dart/exe 3.6.0

fasta

Input: 2500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 1.dart 362ms 4.0ms 8.9MB 350ms 0ms dart/exe 3.6.0
haxe 1.hx 2469ms 23ms 25.6MB 2327ms 257ms haxe/cpp 4.3.6
haxe 1.hx timeout 0.0ms 5.2MB 4197ms 1007ms haxe/hl/c 4.3.6
haxe 1.hx timeout 0.0ms 5.7MB 4343ms 880ms haxe/hl/jit 1.14.0

Input: 250000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 1.dart 42ms 0.5ms 8.8MB 33ms 0ms dart/exe 3.6.0
haxe 1.hx 261ms 2.6ms 25.6MB 220ms 37ms haxe/cpp 4.3.6
haxe 1.hx 656ms 4.4ms 5.3MB 557ms 110ms haxe/hl/c 4.3.6
haxe 1.hx 688ms 0.8ms 5.8MB 590ms 120ms haxe/hl/jit 1.14.0

helloworld

Input: QwQ

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
haxe 1.hx 2.2ms 0.1ms 4.9MB 0ms 0ms haxe/hl/c 4.3.6
haxe 1.hx 2.3ms 0.2ms 4.4MB 0ms 0ms haxe/cpp 4.3.6
haxe 1.hx 3.7ms 0.4ms 5.3MB 0ms 0ms haxe/hl/jit 1.14.0
dart 1.dart 4.1ms 0.2ms 6.3MB 0ms 0ms dart/exe 3.6.0

http-server

Input: 3000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 2-m.dart 1493ms 15ms 115.8MB 1150ms 1607ms dart/exe 3.6.0
dart 1.dart 4313ms 195ms 118.9MB 1230ms 1553ms dart/exe 3.6.0

Input: 500

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 2-m.dart 309ms 8.5ms 50.0MB 203ms 293ms dart/exe 3.6.0
dart 1.dart 1340ms 116ms 49.9MB 153ms 253ms dart/exe 3.6.0

json-serde

Input: sample 5000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 1.dart 168ms 2.3ms 54.2MB 150ms 10ms dart/exe 3.6.0

Input: canada 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 1.dart 1476ms 12ms 299.3MB 1540ms 117ms dart/exe 3.6.0

knucleotide

Input: 2500000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 3-m.dart 1139ms 62ms 279.7MB 3300ms 113ms dart/exe 3.6.0

Input: 250000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 3-m.dart 224ms 8.3ms 197.1MB 503ms 67ms dart/exe 3.6.0

lru

Input: 1000 1000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
haxe 1.hx 134ms 0.6ms 4.9MB 123ms 0ms haxe/hl/c 4.3.6
haxe 1.hx 134ms 2.1ms 20.4MB 113ms 7ms haxe/cpp 4.3.6
haxe 1.hx 159ms 4.3ms 5.8MB 150ms 0ms haxe/hl/jit 1.14.0
dart 2.dart 163ms 2.7ms 9.3MB 150ms 0ms dart/exe 3.6.0
dart 1.dart 511ms 5.2ms 9.1MB 493ms 0ms dart/exe 3.6.0

Input: 1000 3000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
haxe 1.hx 379ms 2.0ms 25.5MB 367ms 7ms haxe/cpp 4.3.6
haxe 1.hx 400ms 2.9ms 5.1MB 387ms 0ms haxe/hl/c 4.3.6
haxe 1.hx 465ms 15ms 5.7MB 450ms 3ms haxe/hl/jit 1.14.0
dart 2.dart 473ms 6.0ms 9.1MB 463ms 0ms dart/exe 3.6.0
dart 1.dart 1527ms 12ms 9.1MB 1503ms 10ms dart/exe 3.6.0

Input: 100 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
haxe 1.hx 62ms 0.5ms 12.3MB 50ms 0ms haxe/cpp 4.3.6
haxe 1.hx 67ms 1.6ms 5.2MB 57ms 0ms haxe/hl/c 4.3.6
dart 2.dart 75ms 0.3ms 9.4MB 67ms 0ms dart/exe 3.6.0
haxe 1.hx 80ms 2.3ms 5.7MB 73ms 0ms haxe/hl/jit 1.14.0
dart 1.dart 121ms 9.8ms 9.0MB 110ms 0ms dart/exe 3.6.0

merkletrees

Input: 17

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 1.dart 335ms 2.0ms 63.6MB 303ms 33ms dart/exe 3.6.0
haxe 1.hx 937ms 25ms 95.1MB 1047ms 60ms haxe/cpp 4.3.6
haxe 1.hx timeout 0.0ms 34.6MB 4897ms 500ms haxe/hl/c 4.3.6
haxe 1.hx timeout 0.0ms 57.0MB 5997ms 450ms haxe/hl/jit 1.14.0

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 1.dart 88ms 1.8ms 43.6MB 57ms 20ms dart/exe 3.6.0
haxe 1.hx 182ms 9.8ms 26.6MB 187ms 17ms haxe/cpp 4.3.6
haxe 1.hx 1303ms 6.2ms 12.7MB 1223ms 157ms haxe/hl/c 4.3.6
haxe 1.hx 1338ms 11ms 22.2MB 1360ms 130ms haxe/hl/jit 1.14.0

nbody

Input: 5000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 3.dart 408ms 3.0ms 6.1MB 397ms 0ms dart/exe 3.6.0
haxe 2.hx 849ms 0.6ms 5.1MB 840ms 0ms haxe/hl/c 4.3.6
haxe 1.hx 1050ms 7.6ms 5.0MB 1040ms 0ms haxe/hl/c 4.3.6
haxe 3.hx 1395ms 4.3ms 27.6MB 1567ms 37ms haxe/cpp 4.3.6
haxe 2.hx 2401ms 9.3ms 5.7MB 2393ms 0ms haxe/hl/jit 1.14.0
haxe 1.hx 2461ms 9.3ms 5.7MB 2447ms 0ms haxe/hl/jit 1.14.0
haxe 1.hx timeout 0.0ms 4.4MB 4987ms 0ms haxe/cpp 4.3.6
haxe 2.hx timeout 0.0ms 4.4MB 4987ms 0ms haxe/cpp 4.3.6
haxe 3.hx timeout 0.0ms 5.2MB 3913ms 1573ms haxe/hl/c 4.3.6
haxe 3.hx timeout 0.0ms 5.8MB 4083ms 1367ms haxe/hl/jit 1.14.0

Input: 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 3.dart 46ms 0.1ms 6.3MB 33ms 0ms dart/exe 3.6.0
haxe 2.hx 90ms 1.7ms 5.1MB 80ms 0ms haxe/hl/c 4.3.6
haxe 1.hx 110ms 2.9ms 5.0MB 100ms 0ms haxe/hl/c 4.3.6
haxe 3.hx 156ms 2.4ms 25.6MB 160ms 3ms haxe/cpp 4.3.6
haxe 2.hx 245ms 1.6ms 5.7MB 230ms 0ms haxe/hl/jit 1.14.0
haxe 1.hx 254ms 5.5ms 5.7MB 243ms 0ms haxe/hl/jit 1.14.0
haxe 2.hx 673ms 2.0ms 4.4MB 660ms 0ms haxe/cpp 4.3.6
haxe 3.hx 676ms 1.9ms 5.3MB 510ms 220ms haxe/hl/c 4.3.6
haxe 1.hx 809ms 9.4ms 4.4MB 797ms 0ms haxe/cpp 4.3.6
haxe 3.hx 885ms 183ms 5.8MB 740ms 203ms haxe/hl/jit 1.14.0

pidigits

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 2.dart 1252ms 6.2ms 14.6MB 1213ms 37ms dart/exe 3.6.0

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 2.dart 311ms 4.2ms 14.8MB 290ms 17ms dart/exe 3.6.0

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 204.3MB 4940ms 63ms dart/exe 3.6.0

Input: 250000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 1.dart 559ms 5.1ms 48.0MB 537ms 13ms dart/exe 3.6.0

spectral-norm

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 1.dart 3742ms 9.1ms 6.4MB 3730ms 0ms dart/exe 3.6.0
haxe 1.hx 3921ms 12ms 5.3MB 3903ms 3ms haxe/hl/c 4.3.6
dart 2.dart 4346ms 17ms 6.3MB 4333ms 0ms dart/exe 3.6.0
haxe 1.hx timeout 0.0ms 7.0MB 4980ms 3ms haxe/cpp 4.3.6
haxe 1.hx timeout 0.0ms 5.8MB 4990ms 0ms haxe/hl/jit 1.14.0

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 1.dart 939ms 2.8ms 6.3MB 927ms 0ms dart/exe 3.6.0
haxe 1.hx 987ms 3.1ms 5.1MB 970ms 0ms haxe/hl/c 4.3.6
dart 2.dart 1097ms 4.9ms 6.3MB 1087ms 0ms dart/exe 3.6.0
haxe 1.hx 2391ms 3.2ms 6.6MB 2380ms 0ms haxe/cpp 4.3.6
haxe 1.hx timeout 0.0ms 5.8MB 4990ms 0ms haxe/hl/jit 1.14.0

Input: 2000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 1.dart 242ms 2.8ms 6.3MB 233ms 0ms dart/exe 3.6.0
haxe 1.hx 252ms 1.6ms 5.1MB 240ms 0ms haxe/hl/c 4.3.6
dart 2.dart 280ms 1.9ms 6.1MB 267ms 0ms dart/exe 3.6.0
haxe 1.hx 600ms 1.0ms 5.4MB 590ms 0ms haxe/cpp 4.3.6
haxe 1.hx 2314ms 13ms 5.7MB 2300ms 0ms haxe/hl/jit 1.14.0