Chapel VS Python benchmarks

Current benchmark data was generated on Tue Dec 31 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
python 1.py 1086ms 7.1ms 95.8MB 1023ms 47ms pypy 3.10.14
chapel 4.chpl 1855ms 24ms 66.3MB 1843ms 3ms chpl 1.31.0
chapel 3.chpl 1925ms 21ms 66.3MB 1917ms 0ms chpl 1.31.0
python 1.py timeout 0.0ms 40.8MB 4967ms 17ms cpython 3.13.1
python 1.py timeout 0.0ms 40.5MB 4750ms 237ms pyston 3.8.12

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
python 1.py 93ms 4.4ms 68.1MB 57ms 20ms pypy 3.10.14
chapel 3.chpl 183ms 2.0ms 36.3MB 173ms 0ms chpl 1.31.0
chapel 4.chpl 185ms 4.8ms 36.4MB 180ms 0ms chpl 1.31.0
python 1.py 448ms 2.5ms 11.9MB 423ms 7ms pyston 3.8.12
python 1.py 675ms 16ms 12.6MB 660ms 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 1119ms 8.2ms 102.5MB 1053ms 50ms pypy 3.10.14
chapel 1-m.chpl 2149ms 35ms 527.8MB 4187ms 63ms chpl 1.31.0
python 1.py timeout 0.0ms 21.3MB 4980ms 3ms cpython 3.13.1
python 1.py timeout 0.0ms 17.4MB 4980ms 7ms pyston 3.8.12

Input: 1000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1-m.chpl 183ms 18ms 488.7MB 287ms 40ms chpl 1.31.0
python 1.py 203ms 0.3ms 84.2MB 163ms 27ms pypy 3.10.14
python 1.py 554ms 29ms 20.5MB 530ms 3ms cpython 3.13.1
python 1.py 598ms 6.9ms 16.8MB 577ms 10ms pyston 3.8.12

edigits

Input: 250001

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1.chpl 75ms 2.3ms 36.4MB 70ms 0ms chpl 1.31.0
python 1.py 236ms 4.6ms 82.9MB 197ms 27ms pypy 3.10.14
python 1.py 341ms 2.5ms 12.7MB 330ms 0ms cpython 3.13.1
python 1.py 1892ms 11ms 9.6MB 1877ms 0ms pyston 3.8.12

Input: 100000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1.chpl 38ms 0.3ms 34.5MB 27ms 7ms chpl 1.31.0
python 1.py 97ms 4.0ms 62.8MB 70ms 10ms pypy 3.10.14
python 1.py 107ms 1.8ms 12.1MB 90ms 3ms cpython 3.13.1
python 1.py 334ms 3.4ms 8.8MB 317ms 0ms pyston 3.8.12

fasta

Input: 2500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 5-m.chpl 110ms 2.4ms 32.4MB 183ms 3ms chpl 1.31.0
python 1.py 1807ms 11ms 88.3MB 1767ms 30ms pypy 3.10.14
python 5-m.py 2335ms 46ms 12.5MB 3357ms 953ms pyston 3.8.12
python 5-m.py 2672ms 21ms 64.9MB 3783ms 763ms pypy 3.10.14
python 1.py 2864ms 24ms 8.1MB 2850ms 3ms pyston 3.8.12
python 5-m.py 3195ms 8.8ms 13.8MB 4240ms 883ms cpython 3.13.1
python 1.py 4308ms 7.9ms 8.8MB 4297ms 0ms cpython 3.13.1

Input: 250000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 5.chpl 27ms 0.7ms 32.4MB 23ms 0ms chpl 1.31.0
python 1.py 238ms 5.8ms 63.6MB 210ms 13ms pypy 3.10.14
python 5-m.py 295ms 6.0ms 12.5MB 383ms 127ms pyston 3.8.12
python 1.py 299ms 3.5ms 8.1MB 287ms 0ms pyston 3.8.12
python 5-m.py 377ms 1.5ms 13.8MB 457ms 123ms cpython 3.13.1
python 1.py 451ms 3.5ms 8.8MB 440ms 3ms cpython 3.13.1
python 5-m.py 510ms 5.7ms 64.9MB 750ms 283ms pypy 3.10.14

helloworld

Input: QwQ

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
python 1.py 11ms 0.8ms 7.6MB 0ms 0ms pyston 3.8.12
python 1.py 13ms 1.3ms 8.5MB 10ms 0ms cpython 3.13.1
chapel 1.chpl 17ms 1.9ms 32.8MB 10ms 0ms chpl 1.31.0
python 1.py 26ms 0.9ms 51.0MB 8ms 8ms pypy 3.10.14

knucleotide

Input: 2500000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 3-m.chpl 719ms 7.0ms 102.9MB 1350ms 7ms chpl 1.31.0
python 3-m.py 2164ms 33ms 137.9MB 7297ms 307ms pypy 3.10.14
python 3-m.py 2926ms 28ms 34.0MB 11103ms 117ms pyston 3.8.12
python 3.py timeout 0.0ms 35.7MB 93ms 7ms cpython 3.13.1

Input: 250000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 3-m.chpl 118ms 3.2ms 81.0MB 200ms 0ms chpl 1.31.0
python 3-m.py 356ms 2.8ms 75.7MB 893ms 163ms pypy 3.10.14
python 3-m.py 377ms 10ms 15.6MB 1223ms 73ms pyston 3.8.12
python 3-m.py 607ms 6.1ms 17.1MB 2127ms 67ms cpython 3.13.1

nbody

Input: 5000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 2.chpl 310ms 1.1ms 32.8MB 300ms 0ms chpl 1.31.0
python 2.py 1278ms 0.7ms 59.8MB 1253ms 10ms pypy 3.10.14
python 1.py 2492ms 13ms 56.6MB 2467ms 10ms pypy 3.10.14
python 1.py timeout 0.0ms 8.6MB 4983ms 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
chapel 2.chpl 49ms 1.1ms 32.9MB 43ms 0ms chpl 1.31.0
python 2.py 165ms 1.2ms 57.8MB 143ms 10ms pypy 3.10.14
python 1.py 284ms 2.2ms 56.6MB 267ms 3ms pypy 3.10.14
python 1.py 892ms 9.1ms 8.3MB 883ms 0ms pyston 3.8.12
python 2.py 1234ms 13ms 8.3MB 1220ms 0ms pyston 3.8.12
python 1.py 2829ms 9.3ms 8.8MB 2813ms 0ms cpython 3.13.1
python 2.py 3043ms 23ms 8.8MB 3030ms 0ms cpython 3.13.1

pidigits

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 2.chpl 428ms 1.0ms 34.2MB 417ms 0ms chpl 1.31.0
python 4.py 1803ms 1.7ms 8.9MB 1750ms 37ms pyston 3.8.12
python 4.py 1882ms 15ms 9.4MB 1823ms 40ms cpython 3.13.1
python 4.py 2018ms 13ms 89.1MB 1983ms 20ms pypy 3.10.14

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 2.chpl 115ms 2.9ms 34.4MB 103ms 7ms chpl 1.31.0
python 4.py 427ms 4.9ms 8.8MB 413ms 0ms pyston 3.8.12
python 4.py 450ms 5.6ms 9.1MB 437ms 0ms cpython 3.13.1
python 4.py 515ms 2.6ms 83.8MB 480ms 17ms pypy 3.10.14

regex-redux

Input: 2500000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 3.chpl 1315ms 8.8ms 224.1MB 1263ms 40ms chpl 1.31.0
python 1.py 2122ms 9.7ms 243.2MB 2060ms 43ms pypy 3.10.14
python 1.py 4481ms 9.0ms 226.3MB 4283ms 180ms pyston 3.8.12
python 1.py timeout 0.0ms 165.8MB 4940ms 40ms cpython 3.13.1

Input: 250000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 3.chpl 161ms 3.9ms 52.9MB 140ms 10ms chpl 1.31.0
python 1.py 310ms 4.2ms 85.0MB 273ms 20ms pypy 3.10.14
python 1.py 468ms 2.3ms 30.5MB 440ms 13ms pyston 3.8.12
python 1.py 594ms 8.6ms 31.0MB 557ms 23ms cpython 3.13.1

secp256k1

Input: 2000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1.chpl 1147ms 46ms 33.1MB 1137ms 0ms chpl 1.31.0
python 1.py 3007ms 4.8ms 8.3MB 2997ms 0ms pyston 3.8.12
python 1.py 3542ms 41ms 74.6MB 3513ms 13ms pypy 3.10.14
python 1.py 3659ms 51ms 8.8MB 3650ms 0ms cpython 3.13.1

Input: 500

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1.chpl 297ms 3.2ms 33.0MB 287ms 3ms chpl 1.31.0
python 1.py 765ms 9.3ms 8.3MB 750ms 0ms pyston 3.8.12
python 1.py 922ms 10.0ms 8.8MB 913ms 0ms cpython 3.13.1
python 1.py 973ms 12ms 67.5MB 947ms 10ms pypy 3.10.14

spectral-norm

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1-m.chpl 1822ms 10.0ms 32.9MB 3613ms 0ms chpl 1.31.0
chapel 1.chpl 3541ms 31ms 32.8MB 3530ms 3ms chpl 1.31.0
python 8.py timeout 0.0ms 16.7MB 43ms 13ms cpython 3.13.1
python 8.py timeout 0.0ms 99.4MB 790ms 163ms pypy 3.10.14
python 8.py timeout 0.0ms 16.5MB 67ms 20ms pyston 3.8.12

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1-m.chpl 467ms 2.3ms 32.8MB 897ms 3ms chpl 1.31.0
chapel 1.chpl 893ms 7.1ms 32.8MB 887ms 0ms chpl 1.31.0
python 8.py timeout 0.0ms 16.5MB 87ms 20ms cpython 3.13.1
python 8.py timeout 0.0ms 100.4MB 1460ms 480ms pypy 3.10.14
python 8.py timeout 0.0ms 15.6MB 147ms 37ms pyston 3.8.12

Input: 2000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1-m.chpl 132ms 0.7ms 32.8MB 230ms 0ms chpl 1.31.0
chapel 1.chpl 241ms 1.9ms 32.9MB 230ms 3ms chpl 1.31.0
python 8-m.py 1880ms 5.8ms 95.0MB 6000ms 323ms pypy 3.10.14
python 8.py timeout 0.0ms 16.2MB 233ms 33ms cpython 3.13.1
python 8.py timeout 0.0ms 17.2MB 440ms 127ms pyston 3.8.12