Dart VS Python 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
python 1.py 1173ms 8.1ms 95.8MB 1110ms 47ms pypy 3.10.14
python 1.py timeout 0.0ms 40.9MB 4973ms 13ms cpython 3.13.1
python 1.py timeout 0.0ms 40.5MB 4760ms 223ms pyston 3.8.12

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
python 1.py 95ms 0.2ms 68.0MB 70ms 10ms pypy 3.10.14
python 1.py 478ms 5.3ms 11.9MB 457ms 7ms pyston 3.8.12
python 1.py 709ms 6.8ms 12.6MB 693ms 0ms cpython 3.13.1

coro-prime-sieve

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
python 1.py 1208ms 2.6ms 102.6MB 1153ms 37ms pypy 3.10.14
dart 1-m.dart 1652ms 2861ms 19.1MB 5583ms 77ms dart/exe 3.6.0
python 1.py timeout 0.0ms 21.3MB 4977ms 10ms cpython 3.13.1
python 1.py timeout 0.0ms 17.4MB 4983ms 7ms pyston 3.8.12

Input: 1000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
python 1.py 223ms 7.6ms 84.5MB 187ms 20ms pypy 3.10.14
dart 1.dart 343ms 1.4ms 10.3MB 343ms 20ms dart/exe 3.6.0
python 1.py 599ms 21ms 20.5MB 577ms 7ms cpython 3.13.1
python 1.py 645ms 2.4ms 16.8MB 627ms 3ms pyston 3.8.12

edigits

Input: 250001

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
python 1.py 250ms 2.1ms 82.6MB 210ms 23ms pypy 3.10.14
python 1.py 361ms 0.4ms 12.5MB 347ms 3ms cpython 3.13.1
python 1.py 1992ms 0.6ms 9.6MB 1973ms 3ms pyston 3.8.12
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
python 1.py 97ms 0.8ms 62.8MB 73ms 10ms pypy 3.10.14
python 1.py 115ms 4.0ms 12.1MB 103ms 0ms cpython 3.13.1
python 1.py 347ms 0.9ms 8.8MB 330ms 3ms pyston 3.8.12
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
python 1.py 1894ms 15ms 88.3MB 1850ms 27ms pypy 3.10.14
python 5-m.py 2507ms 40ms 12.5MB 3587ms 1077ms pyston 3.8.12
python 5-m.py 2869ms 14ms 65.0MB 4043ms 847ms pypy 3.10.14
python 1.py 3008ms 21ms 8.1MB 2993ms 0ms pyston 3.8.12
python 5-m.py 3376ms 12ms 13.9MB 4490ms 900ms cpython 3.13.1
python 1.py 4732ms 160ms 8.8MB 4717ms 3ms cpython 3.13.1

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
python 1.py 253ms 5.0ms 63.5MB 223ms 17ms pypy 3.10.14
python 1.py 316ms 2.6ms 8.1MB 300ms 0ms pyston 3.8.12
python 5-m.py 317ms 3.0ms 12.5MB 393ms 157ms pyston 3.8.12
python 5-m.py 402ms 2.8ms 13.9MB 497ms 127ms cpython 3.13.1
python 1.py 483ms 29ms 8.8MB 473ms 0ms cpython 3.13.1
python 5-m.py 551ms 5.1ms 64.9MB 807ms 320ms pypy 3.10.14

helloworld

Input: QwQ

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 1.dart 4.1ms 0.2ms 6.3MB 0ms 0ms dart/exe 3.6.0
python 1.py 11ms 0.9ms 7.6MB 0ms 0ms pyston 3.8.12
python 1.py 14ms 1.0ms 8.5MB 10ms 0ms cpython 3.13.1
python 1.py 30ms 1.2ms 51.1MB 10ms 10ms pypy 3.10.14

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
python 1.py 2259ms 233ms 36.4MB 1093ms 1577ms pyston 3.8.12
python 1.py 2398ms 443ms 33.4MB 1530ms 1643ms cpython 3.13.1
dart 1.dart 4313ms 195ms 118.9MB 1230ms 1553ms dart/exe 3.6.0
python 1.py 4470ms 99ms 107.9MB 2907ms 1170ms pypy 3.10.14

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
python 1.py 1137ms 67ms 30.8MB 253ms 257ms pyston 3.8.12
python 1.py 1191ms 135ms 28.7MB 300ms 287ms cpython 3.13.1
dart 1.dart 1340ms 116ms 49.9MB 153ms 253ms dart/exe 3.6.0
python 1.py 1765ms 273ms 90.6MB 687ms 253ms pypy 3.10.14

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
python 1.py 203ms 4.6ms 38.1MB 170ms 17ms pyston 3.8.12
python 1.py 220ms 1.4ms 38.6MB 187ms 13ms cpython 3.13.1
python 1.py 292ms 4.1ms 87.4MB 250ms 20ms pypy 3.10.14

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
python 1.py 1853ms 13ms 220.5MB 1690ms 150ms pyston 3.8.12
python 1.py 1889ms 5.0ms 222.1MB 1817ms 57ms pypy 3.10.14
python 1.py 1920ms 10ms 221.4MB 1827ms 80ms cpython 3.13.1

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
python 3-m.py 2424ms 30ms 137.9MB 8057ms 300ms pypy 3.10.14
python 3-m.py 3163ms 38ms 33.7MB 11980ms 123ms pyston 3.8.12
python 3.py timeout 0.0ms 35.3MB 90ms 23ms cpython 3.13.1

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
python 3-m.py 392ms 4.4ms 77.4MB 1010ms 137ms pypy 3.10.14
python 3-m.py 400ms 3.1ms 17.5MB 1320ms 60ms pyston 3.8.12
python 3-m.py 647ms 1.5ms 17.1MB 2273ms 63ms cpython 3.13.1

lru

Input: 1000 1000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
python 2.py 147ms 3.8ms 57.9MB 123ms 7ms pypy 3.10.14
dart 2.dart 163ms 2.7ms 9.3MB 150ms 0ms dart/exe 3.6.0
python 1.py 182ms 4.6ms 59.5MB 153ms 10ms pypy 3.10.14
dart 1.dart 511ms 5.2ms 9.1MB 493ms 0ms dart/exe 3.6.0
python 1.py 724ms 9.4ms 8.9MB 707ms 0ms pyston 3.8.12
python 2.py 839ms 4.9ms 8.5MB 820ms 0ms pyston 3.8.12
python 1.py 1113ms 5.3ms 9.3MB 1103ms 0ms cpython 3.13.1
python 2.py 1298ms 19ms 9.0MB 1283ms 0ms cpython 3.13.1

Input: 1000 3000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
python 2.py 336ms 0.2ms 58.9MB 317ms 3ms pypy 3.10.14
python 1.py 377ms 2.4ms 60.4MB 347ms 13ms pypy 3.10.14
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
python 1.py 2130ms 21ms 8.9MB 2113ms 0ms pyston 3.8.12
python 2.py 2493ms 27ms 8.5MB 2477ms 0ms pyston 3.8.12
python 1.py 3337ms 21ms 9.3MB 3323ms 0ms cpython 3.13.1
python 2.py 3942ms 194ms 9.0MB 3930ms 0ms cpython 3.13.1

Input: 100 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
dart 2.dart 75ms 0.3ms 9.4MB 67ms 0ms dart/exe 3.6.0
python 2.py 103ms 0.7ms 57.8MB 83ms 7ms pypy 3.10.14
dart 1.dart 121ms 9.8ms 9.0MB 110ms 0ms dart/exe 3.6.0
python 1.py 122ms 3.3ms 58.5MB 100ms 10ms pypy 3.10.14
python 1.py 348ms 2.1ms 8.5MB 333ms 0ms pyston 3.8.12
python 2.py 391ms 6.8ms 8.1MB 380ms 0ms pyston 3.8.12
python 1.py 537ms 10ms 9.1MB 520ms 0ms cpython 3.13.1
python 2.py 630ms 6.8ms 8.8MB 617ms 0ms cpython 3.13.1

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
python 1.py 2270ms 15ms 210.2MB 2143ms 107ms pypy 3.10.14
python 1.py timeout 0.0ms 93.9MB 4947ms 33ms cpython 3.13.1
python 1.py timeout 0.0ms 130.1MB 4933ms 53ms pyston 3.8.12

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
python 1.py 386ms 7.0ms 103.5MB 330ms 40ms pypy 3.10.14
python 1.py 3084ms 36ms 37.1MB 3060ms 7ms cpython 3.13.1
python 1.py timeout 0.0ms 48.8MB 4967ms 20ms pyston 3.8.12

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
python 2.py 1350ms 5.2ms 59.8MB 1323ms 10ms pypy 3.10.14
python 1.py 2648ms 24ms 56.8MB 2623ms 10ms pypy 3.10.14
python 1.py timeout 0.0ms 8.6MB 4987ms 0ms cpython 3.13.1
python 2.py timeout 0.0ms 8.8MB 4987ms 0ms cpython 3.13.1
python 1.py timeout 0.0ms 8.3MB 4987ms 0ms pyston 3.8.12
python 2.py timeout 0.0ms 8.1MB 4990ms 0ms pyston 3.8.12

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
python 2.py 178ms 1.1ms 57.6MB 153ms 10ms pypy 3.10.14
python 1.py 304ms 4.4ms 56.6MB 273ms 17ms pypy 3.10.14
python 1.py 929ms 4.4ms 8.3MB 917ms 0ms pyston 3.8.12
python 2.py 1311ms 27ms 8.3MB 1300ms 0ms pyston 3.8.12
python 1.py 2932ms 14ms 8.6MB 2913ms 3ms cpython 3.13.1
python 2.py 3144ms 50ms 8.8MB 3130ms 0ms cpython 3.13.1

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
python 4.py 1902ms 7.0ms 9.0MB 1850ms 33ms pyston 3.8.12
python 4.py 1977ms 5.4ms 9.5MB 1910ms 47ms cpython 3.13.1
python 4.py 2147ms 5.0ms 89.1MB 2103ms 27ms pypy 3.10.14

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
python 4.py 449ms 1.1ms 8.6MB 440ms 0ms pyston 3.8.12
python 4.py 472ms 4.8ms 9.1MB 457ms 0ms cpython 3.13.1
python 4.py 548ms 11ms 83.6MB 510ms 20ms pypy 3.10.14

regex-redux

Input: 2500000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
python 1.py 2229ms 3.7ms 242.9MB 2180ms 33ms pypy 3.10.14
python 1.py 4733ms 26ms 226.2MB 4570ms 143ms pyston 3.8.12
dart 1.dart timeout 0.0ms 204.3MB 4940ms 63ms dart/exe 3.6.0
python 1.py timeout 0.0ms 112.3MB 4940ms 47ms cpython 3.13.1

Input: 250000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
python 1.py 330ms 6.2ms 85.2MB 287ms 27ms pypy 3.10.14
python 1.py 495ms 2.1ms 30.3MB 460ms 23ms pyston 3.8.12
dart 1.dart 559ms 5.1ms 48.0MB 537ms 13ms dart/exe 3.6.0
python 1.py 628ms 3.5ms 31.0MB 587ms 23ms cpython 3.13.1

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
dart 2.dart 4346ms 17ms 6.3MB 4333ms 0ms dart/exe 3.6.0
python 8.py timeout 0.0ms 16.8MB 47ms 17ms cpython 3.13.1
python 8.py timeout 0.0ms 99.4MB 860ms 143ms pypy 3.10.14
python 8.py timeout 0.0ms 16.1MB 70ms 23ms pyston 3.8.12

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
dart 2.dart 1097ms 4.9ms 6.3MB 1087ms 0ms dart/exe 3.6.0
python 8.py timeout 0.0ms 16.5MB 130ms 23ms cpython 3.13.1
python 8.py timeout 0.0ms 98.8MB 1547ms 473ms pypy 3.10.14
python 8.py timeout 0.0ms 15.7MB 137ms 47ms pyston 3.8.12

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
dart 2.dart 280ms 1.9ms 6.1MB 267ms 0ms dart/exe 3.6.0
python 8-m.py 2011ms 0.9ms 95.1MB 6373ms 350ms pypy 3.10.14
python 8.py timeout 0.0ms 16.2MB 263ms 47ms cpython 3.13.1
python 8.py timeout 0.0ms 17.1MB 400ms 117ms pyston 3.8.12