Dart VS Lua benchmarks

Current benchmark data was generated on Mon Jun 23 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 728ms 5.9ms 81.0MB 700ms 33ms dart/exe 3.8.1
lua 1.lua 3539ms 82ms 172.9MB 3403ms 123ms luajit 2.1.0-beta3
lua 1.lua timeout 0.0ms 105.0MB 4947ms 37ms lua 5.4.7

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 1.dart 77ms 1.2ms 42.9MB 53ms 17ms dart/exe 3.8.1
lua 1.lua 297ms 5.1ms 15.9MB 270ms 7ms luajit 2.1.0-beta3
lua 1.lua 823ms 6.8ms 16.9MB 807ms 0ms lua 5.4.7

coro-prime-sieve

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 1.dart 4903ms 31ms 19.4MB 5353ms 77ms dart/exe 3.8.1

Input: 1000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 1.dart 341ms 6.6ms 10.4MB 347ms 10ms dart/exe 3.8.1

edigits

Input: 250001

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 1.dart 3601ms 12ms 18.0MB 3563ms 27ms dart/exe 3.8.1

Input: 100000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 1.dart 584ms 7.1ms 10.5MB 560ms 13ms dart/exe 3.8.1

fannkuch-redux

Input: 11

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 2.dart 2674ms 11ms 6.1MB 2667ms 0ms dart/exe 3.8.1

Input: 10

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 2.dart 221ms 2.0ms 6.3MB 210ms 0ms dart/exe 3.8.1

fasta

Input: 2500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 1.dart 363ms 3.2ms 8.8MB 353ms 0ms dart/exe 3.8.1

Input: 250000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 1.dart 43ms 0.9ms 8.8MB 30ms 0ms dart/exe 3.8.1

helloworld

Input: QwQ

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
lua 1.lua 1.3ms 0.1ms 2.4MB 0ms 0ms luajit 2.1.0-beta3
lua 1.lua 1.4ms 0.3ms 2.1MB 0ms 0ms lua 5.4.7
dart 1.dart 3.5ms 0.2ms 5.7MB 0ms 0ms dart/exe 3.8.1

http-server

Input: 3000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 2-m.dart 1290ms 24ms 94.6MB 1333ms 1373ms dart/exe 3.8.1
dart 1.dart 4416ms 92ms 97.4MB 1517ms 1573ms dart/exe 3.8.1

Input: 500

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 2-m.dart 245ms 3.0ms 50.3MB 193ms 253ms dart/exe 3.8.1
dart 1.dart 2265ms 50ms 50.3MB 173ms 250ms dart/exe 3.8.1

json-serde

Input: sample 5000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 1.dart 165ms 2.9ms 54.5MB 137ms 20ms dart/exe 3.8.1

Input: canada 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 1.dart 1493ms 20ms 204.4MB 1723ms 127ms dart/exe 3.8.1

knucleotide

Input: 2500000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 3-m.dart 1096ms 28ms 269.2MB 3343ms 120ms dart/exe 3.8.1

Input: 250000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 3-m.dart 220ms 5.8ms 184.9MB 517ms 70ms dart/exe 3.8.1

lru

Input: 1000 1000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 2.dart 167ms 3.6ms 9.1MB 157ms 0ms dart/exe 3.8.1
dart 1.dart 572ms 8.2ms 8.8MB 560ms 0ms dart/exe 3.8.1

Input: 1000 3000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 2.dart 484ms 10.0ms 9.1MB 473ms 0ms dart/exe 3.8.1
dart 1.dart 1698ms 12ms 9.3MB 1683ms 7ms dart/exe 3.8.1

Input: 100 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 2.dart 80ms 1.1ms 9.1MB 70ms 0ms dart/exe 3.8.1
dart 1.dart 119ms 0.3ms 9.1MB 110ms 0ms dart/exe 3.8.1

merkletrees

Input: 17

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 1.dart 331ms 1.4ms 63.8MB 307ms 27ms dart/exe 3.8.1
lua 1.lua timeout 0.0ms 107.4MB 4953ms 33ms lua 5.4.7
lua 1.lua timeout 0.0ms 149.3MB 4937ms 50ms luajit 2.1.0-beta3

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 1.dart 87ms 0.6ms 43.8MB 60ms 17ms dart/exe 3.8.1
lua 1.lua 1200ms 56ms 31.1MB 1170ms 17ms luajit 2.1.0-beta3
lua 1.lua 2310ms 37ms 28.6MB 2290ms 7ms lua 5.4.7

nbody

Input: 5000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 3.dart 407ms 1.9ms 6.3MB 400ms 0ms dart/exe 3.8.1
lua 4.lua 715ms 2.7ms 2.4MB 707ms 0ms luajit 2.1.0-beta3
lua 4.lua timeout 0.0ms 2.3MB 4990ms 0ms lua 5.4.7

Input: 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 3.dart 45ms 0.9ms 6.3MB 40ms 0ms dart/exe 3.8.1
lua 4.lua 75ms 1.4ms 2.3MB 70ms 0ms luajit 2.1.0-beta3
lua 4.lua 1160ms 15ms 2.3MB 1153ms 0ms lua 5.4.7

pidigits

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 2.dart 1248ms 6.4ms 14.8MB 1220ms 33ms dart/exe 3.8.1

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 2.dart 308ms 2.5ms 14.6MB 290ms 10ms dart/exe 3.8.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 130.0MB 4970ms 37ms dart/exe 3.8.1

Input: 250000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 1.dart 633ms 2.1ms 43.2MB 607ms 13ms dart/exe 3.8.1

spectral-norm

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 1.dart 3762ms 11ms 6.4MB 3750ms 0ms dart/exe 3.8.1
lua 1.lua 4070ms 8.1ms 2.5MB 4060ms 0ms luajit 2.1.0-beta3
dart 2.dart 4940ms 8.4ms 6.4MB 4930ms 0ms dart/exe 3.8.1
lua 1.lua timeout 0.0ms 2.4MB 4990ms 0ms lua 5.4.7

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 1.dart 945ms 7.6ms 6.3MB 933ms 0ms dart/exe 3.8.1
lua 1.lua 1046ms 19ms 2.4MB 1037ms 0ms luajit 2.1.0-beta3
dart 2.dart 1239ms 3.2ms 6.1MB 1227ms 0ms dart/exe 3.8.1
lua 1.lua timeout 0.0ms 2.1MB 4990ms 0ms lua 5.4.7

Input: 2000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 1.dart 239ms 0.0ms 6.1MB 230ms 0ms dart/exe 3.8.1
lua 1.lua 258ms 1.6ms 2.3MB 250ms 0ms luajit 2.1.0-beta3
dart 2.dart 320ms 8.4ms 6.3MB 310ms 0ms dart/exe 3.8.1
lua 1.lua timeout 0.0ms 2.0MB 4990ms 0ms lua 5.4.7