Dart VS Lua 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
lua 1.lua 3623ms 23ms 173.0MB 3477ms 133ms luajit 2.1.0-beta3
lua 1.lua timeout 0.0ms 104.9MB 4953ms 33ms lua 5.4.7

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
lua 1.lua 292ms 3.1ms 15.9MB 267ms 10ms luajit 2.1.0-beta3
lua 1.lua 824ms 5.5ms 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-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

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

fasta

Input: 2500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
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
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
lua 1.lua 1.5ms 0.2ms 2.3MB 0ms 0ms luajit 2.1.0-beta3
lua 1.lua 1.6ms 0.1ms 2.1MB 0ms 0ms lua 5.4.7
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
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
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
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
lua 1.lua timeout 0.0ms 107.4MB 4947ms 37ms lua 5.4.7
lua 1.lua timeout 0.0ms 149.4MB 4923ms 63ms luajit 2.1.0-beta3

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
lua 1.lua 1392ms 85ms 31.1MB 1360ms 13ms luajit 2.1.0-beta3
lua 1.lua 2291ms 16ms 28.6MB 2270ms 10ms lua 5.4.7

nbody

Input: 5000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 3.dart 408ms 3.7ms 6.1MB 400ms 0ms dart/exe 3.7.2
lua 4.lua 713ms 1.8ms 2.3MB 703ms 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.2ms 6.4MB 33ms 0ms dart/exe 3.7.2
lua 4.lua 75ms 1.1ms 2.4MB 70ms 0ms luajit 2.1.0-beta3
lua 4.lua 1112ms 26ms 2.3MB 1103ms 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 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

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

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
lua 1.lua 4068ms 9.8ms 2.5MB 4057ms 0ms luajit 2.1.0-beta3
dart 2.dart 4338ms 5.9ms 6.4MB 4327ms 0ms dart/exe 3.7.2
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 944ms 2.2ms 6.3MB 930ms 0ms dart/exe 3.7.2
lua 1.lua 1021ms 2.2ms 2.4MB 1010ms 0ms luajit 2.1.0-beta3
dart 2.dart 1088ms 11ms 6.1MB 1080ms 0ms dart/exe 3.7.2
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 241ms 2.5ms 6.3MB 230ms 0ms dart/exe 3.7.2
lua 1.lua 261ms 2.8ms 2.3MB 250ms 0ms luajit 2.1.0-beta3
dart 2.dart 285ms 8.1ms 6.3MB 273ms 0ms dart/exe 3.7.2
lua 1.lua timeout 0.0ms 2.0MB 4990ms 0ms lua 5.4.7