Dart VS Go 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
go 1.go 1214ms 12ms 55.0MB 1190ms 10ms tinygo 0.37.0
go 1-m.go 2372ms 13ms 46.1MB 5267ms 43ms go 1.24.1

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
go 1.go 115ms 1.5ms 5.6MB 107ms 0ms tinygo 0.37.0
go 1-m.go 209ms 0.5ms 8.0MB 370ms 10ms go 1.24.1

coro-prime-sieve

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 1-m.go 473ms 8.9ms 15.6MB 1833ms 3ms go 1.24.1
go 1.go 723ms 8.5ms 269.4MB 670ms 37ms tinygo 0.37.0
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
go 1-m.go 38ms 6.0ms 7.5MB 123ms 0ms go 1.24.1
go 1.go 70ms 2.6ms 68.3MB 50ms 10ms tinygo 0.37.0
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
go 1.go 117ms 1.7ms 8.4MB 110ms 0ms go 1.24.1
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
go 1.go 33ms 0.5ms 8.2MB 23ms 0ms go 1.24.1
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
go 3-m.go 670ms 3.5ms 5.5MB 2587ms 0ms go 1.24.1
go 3.go 2017ms 1.1ms 49.1MB 1997ms 7ms tinygo 0.37.0
dart 2.dart 2741ms 18ms 6.3MB 2730ms 0ms dart/exe 3.7.2

Input: 10

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 3-m.go 73ms 1.0ms 5.6MB 200ms 0ms go 1.24.1
go 3.go 189ms 1.4ms 49.1MB 170ms 3ms tinygo 0.37.0
dart 2.dart 222ms 1.7ms 6.3MB 210ms 0ms dart/exe 3.7.2

fasta

Input: 2500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 3-m.go 124ms 1.1ms 7.5MB 373ms 0ms go 1.24.1
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
go 3-m.go 17ms 1.3ms 7.5MB 30ms 0ms go 1.24.1
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
go 1.go 0.9ms 0.1ms 0.4MB 0ms 0ms tinygo 0.37.0
go 1.go 1.5ms 0.1ms 3.4MB 0ms 0ms go 1.24.1
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
go 1-http2.go 119ms 3.6ms 56.1MB 323ms 80ms go 1.24.1
go 1-m.go 398ms 12ms 176.8MB 660ms 667ms go 1.24.1
go 2-m.go 421ms 8.9ms 172.6MB 703ms 713ms go 1.24.1
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
go 2-m.go 25ms 28ms 28.6MB 60ms 70ms go 1.24.1
go 1-http2.go 32ms 4.0ms 25.3MB 60ms 20ms go 1.24.1
go 1-m.go 78ms 2.4ms 36.8MB 110ms 103ms go 1.24.1
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
go 2-ffi.go 46ms 1.9ms 41.2MB 40ms 7ms go 1.24.1
go 1.go 139ms 1.2ms 18.6MB 133ms 0ms go 1.24.1
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
go 2-ffi.go 244ms 7.5ms 141.3MB 240ms 30ms go 1.24.1
go 1.go 746ms 2.5ms 105.0MB 733ms 10ms go 1.24.1
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
go 7-m.go 680ms 12ms 42.1MB 2393ms 30ms go 1.24.1
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
go 7-m.go 135ms 3.6ms 23.7MB 343ms 20ms go 1.24.1
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
go 3.go 121ms 2.5ms 3.5MB 113ms 0ms go 1.24.1
go 3.go 131ms 2.2ms 0.5MB 123ms 0ms tinygo 0.37.0
dart 2.dart 170ms 1.9ms 9.4MB 160ms 0ms dart/exe 3.7.2
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
go 3.go 388ms 13ms 3.5MB 380ms 0ms go 1.24.1
go 3.go 388ms 2.2ms 0.5MB 380ms 0ms tinygo 0.37.0
dart 2.dart 484ms 3.7ms 9.3MB 470ms 0ms dart/exe 3.7.2
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
go 3.go 51ms 1.0ms 3.5MB 40ms 0ms go 1.24.1
go 3.go 64ms 1.6ms 0.4MB 57ms 0ms tinygo 0.37.0
dart 2.dart 77ms 1.6ms 8.9MB 70ms 0ms dart/exe 3.7.2
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
go 1.go 820ms 47ms 63.2MB 797ms 10ms tinygo 0.37.0
go 2.go 1112ms 7.9ms 55.0MB 1093ms 3ms tinygo 0.37.0
go 1-m.go 1461ms 6.1ms 39.0MB 3090ms 37ms go 1.24.1
go 2-m.go 1661ms 2.3ms 42.9MB 3680ms 40ms go 1.24.1

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
go 1.go 176ms 2.5ms 9.8MB 160ms 0ms tinygo 0.37.0
go 2.go 206ms 2.2ms 17.1MB 190ms 0ms tinygo 0.37.0
go 1-m.go 332ms 4.7ms 12.2MB 677ms 20ms go 1.24.1
go 2-m.go 373ms 2.8ms 13.9MB 787ms 27ms go 1.24.1

nbody

Input: 5000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 1.go 349ms 3.0ms 0.4MB 340ms 0ms tinygo 0.37.0
go 1.go 352ms 2.1ms 3.5MB 343ms 0ms go 1.24.1
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
go 1.go 37ms 0.1ms 3.5MB 30ms 0ms go 1.24.1
go 1.go 38ms 0.7ms 0.4MB 30ms 0ms tinygo 0.37.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
go 8.go 1173ms 7.7ms 8.7MB 1157ms 0ms go 1.24.1
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
go 8.go 280ms 1.6ms 8.6MB 270ms 0ms go 1.24.1
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
go 3.go timeout 0.0ms 122.0MB 4987ms 47ms go 1.24.1
go 3.go timeout 0.0ms 136.3MB 4980ms 10ms tinygo 0.37.0

Input: 250000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 1.dart 570ms 22ms 43.2MB 550ms 10ms dart/exe 3.7.2
go 3.go 1752ms 13ms 19.9MB 1737ms 20ms go 1.24.1
go 3.go 2259ms 19ms 27.6MB 2243ms 0ms tinygo 0.37.0

spectral-norm

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 4-m.go 1911ms 17ms 4.3MB 7403ms 10ms go 1.24.1
go 1.go 3659ms 12ms 5.6MB 3650ms 0ms go 1.24.1
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
go 1.go timeout 0.0ms 0.5MB 4990ms 0ms tinygo 0.37.0

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 4-m.go 481ms 0.6ms 5.5MB 1843ms 0ms go 1.24.1
go 1.go 916ms 4.3ms 3.5MB 910ms 0ms go 1.24.1
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
go 1.go 1397ms 0.4ms 0.5MB 1387ms 0ms tinygo 0.37.0

Input: 2000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 4-m.go 125ms 0.8ms 5.5MB 450ms 0ms go 1.24.1
go 1.go 231ms 1.3ms 3.5MB 220ms 0ms go 1.24.1
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
go 1.go 352ms 0.6ms 0.4MB 340ms 0ms tinygo 0.37.0