Chapel VS Python 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
python 1.py 1210ms 7.0ms 96.2MB 1147ms 47ms pypy 3.10.16
chapel 4.chpl 1962ms 44ms 60.3MB 1950ms 0ms chpl 1.31.0
chapel 3.chpl 2019ms 12ms 60.3MB 2010ms 0ms chpl 1.31.0
python 1.py timeout 0.0ms 40.8MB 4963ms 20ms cpython 3.13.2
python 1.py timeout 0.0ms 40.5MB 4747ms 240ms pyston 3.8.12

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
python 1.py 95ms 1.1ms 68.8MB 67ms 17ms pypy 3.10.16
chapel 4.chpl 185ms 1.2ms 32.4MB 180ms 0ms chpl 1.31.0
chapel 3.chpl 188ms 2.8ms 32.4MB 180ms 0ms chpl 1.31.0
python 1.py 479ms 4.3ms 11.9MB 453ms 10ms pyston 3.8.12
python 1.py 718ms 7.5ms 12.6MB 703ms 0ms cpython 3.13.2

coro-prime-sieve

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
python 1.py 1217ms 27ms 107.0MB 1170ms 30ms pypy 3.10.16
chapel 1-m.chpl 2192ms 58ms 470.2MB 4273ms 73ms chpl 1.31.0
python 1.py 2643ms 6.3ms 25.0MB 2620ms 13ms cpython 3.13.2
python 1.py timeout 0.0ms 17.3MB 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 181ms 1.3ms 427.0MB 293ms 37ms chpl 1.31.0
python 1.py 224ms 3.9ms 86.3MB 190ms 20ms pypy 3.10.16
python 1.py 228ms 1.1ms 20.2MB 207ms 10ms cpython 3.13.2
python 1.py 685ms 12ms 16.8MB 667ms 7ms pyston 3.8.12

edigits

Input: 250001

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1.chpl 71ms 3.7ms 32.4MB 70ms 0ms chpl 1.31.0
python 1.py 254ms 5.1ms 83.6MB 217ms 20ms pypy 3.10.16
python 1.py 360ms 1.5ms 12.5MB 343ms 3ms cpython 3.13.2
python 1.py 2006ms 5.2ms 9.6MB 1990ms 0ms pyston 3.8.12

Input: 100000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1.chpl 32ms 1.2ms 30.5MB 30ms 0ms chpl 1.31.0
python 1.py 100ms 1.7ms 63.4MB 73ms 13ms pypy 3.10.16
python 1.py 139ms 55ms 12.0MB 100ms 0ms cpython 3.13.2
python 1.py 350ms 0.8ms 8.8MB 340ms 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 104ms 1.2ms 28.4MB 190ms 0ms chpl 1.31.0
python 1.py 1852ms 1.6ms 88.8MB 1807ms 30ms pypy 3.10.16
python 5-m.py 2282ms 30ms 65.4MB 3493ms 843ms pypy 3.10.16
python 5-m.py 2455ms 13ms 12.5MB 3537ms 1010ms pyston 3.8.12
python 1.py 3017ms 14ms 8.1MB 3007ms 0ms pyston 3.8.12
python 5-m.py 3351ms 11ms 13.5MB 4443ms 913ms cpython 3.13.2
python 1.py 4656ms 26ms 8.8MB 4640ms 0ms cpython 3.13.2

Input: 250000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 5.chpl 22ms 2.2ms 28.4MB 20ms 0ms chpl 1.31.0
python 1.py 251ms 5.7ms 63.3MB 223ms 13ms pypy 3.10.16
python 5-m.py 311ms 1.4ms 12.4MB 393ms 143ms pyston 3.8.12
python 1.py 318ms 0.3ms 8.1MB 310ms 0ms pyston 3.8.12
python 5-m.py 397ms 5.6ms 13.6MB 480ms 133ms cpython 3.13.2
python 5-m.py 445ms 6.3ms 65.4MB 737ms 310ms pypy 3.10.16
python 1.py 488ms 7.2ms 8.6MB 477ms 0ms cpython 3.13.2

helloworld

Input: QwQ

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1.chpl 11ms 0.5ms 28.8MB 0ms 0ms chpl 1.31.0
python 1.py 11ms 0.5ms 7.6MB 0ms 0ms pyston 3.8.12
python 1.py 14ms 1.0ms 8.6MB 10ms 0ms cpython 3.13.2
python 1.py 29ms 1.1ms 51.6MB 10ms 10ms pypy 3.10.16

knucleotide

Input: 2500000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 3-m.chpl 746ms 3.8ms 97.0MB 1413ms 10ms chpl 1.31.0
python 3-m.py 2435ms 14ms 136.4MB 8277ms 343ms pypy 3.10.16
python 3-m.py 3135ms 60ms 34.3MB 11840ms 123ms pyston 3.8.12
python 3.py timeout 0.0ms 35.6MB 93ms 20ms cpython 3.13.2

Input: 250000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 3-m.chpl 112ms 0.7ms 76.9MB 197ms 3ms chpl 1.31.0
python 3-m.py 389ms 1.1ms 75.7MB 983ms 170ms pypy 3.10.16
python 3-m.py 393ms 4.9ms 14.2MB 1303ms 70ms pyston 3.8.12
python 3-m.py 634ms 4.3ms 15.1MB 2240ms 53ms cpython 3.13.2

nbody

Input: 5000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 2.chpl 319ms 3.7ms 28.8MB 313ms 0ms chpl 1.31.0
python 2.py 1353ms 7.7ms 60.3MB 1330ms 10ms pypy 3.10.16
python 1.py 2647ms 8.4ms 57.2MB 2623ms 10ms pypy 3.10.16
python 1.py timeout 0.0ms 8.6MB 4990ms 0ms cpython 3.13.2
python 2.py timeout 0.0ms 8.8MB 4990ms 0ms cpython 3.13.2
python 1.py timeout 0.0ms 8.3MB 4990ms 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 45ms 0.9ms 28.9MB 40ms 0ms chpl 1.31.0
python 2.py 182ms 1.3ms 58.1MB 160ms 10ms pypy 3.10.16
python 1.py 299ms 2.7ms 57.1MB 280ms 10ms pypy 3.10.16
python 1.py 932ms 16ms 8.3MB 920ms 0ms pyston 3.8.12
python 2.py 1282ms 11ms 8.3MB 1270ms 0ms pyston 3.8.12
python 1.py 2968ms 4.6ms 8.8MB 2953ms 0ms cpython 3.13.2
python 2.py 3214ms 99ms 8.8MB 3200ms 0ms cpython 3.13.2

pidigits

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 2.chpl 442ms 11ms 30.3MB 437ms 0ms chpl 1.31.0
python 4.py 1915ms 5.6ms 8.9MB 1873ms 30ms pyston 3.8.12
python 4.py 1945ms 3.8ms 9.4MB 1893ms 40ms cpython 3.13.2
python 4.py 2174ms 1.1ms 89.4MB 2133ms 30ms pypy 3.10.16

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 2.chpl 113ms 0.5ms 30.4MB 110ms 0ms chpl 1.31.0
python 4.py 451ms 0.7ms 8.6MB 440ms 0ms pyston 3.8.12
python 4.py 468ms 3.4ms 9.0MB 457ms 0ms cpython 3.13.2
python 4.py 549ms 3.3ms 83.8MB 513ms 20ms pypy 3.10.16

regex-redux

Input: 2500000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 3.chpl 1382ms 4.7ms 222.1MB 1337ms 37ms chpl 1.31.0
python 1.py 2244ms 5.8ms 243.6MB 2190ms 40ms pypy 3.10.16
python 1.py 4741ms 7.8ms 225.5MB 4550ms 173ms pyston 3.8.12
python 1.py timeout 0.0ms 146.4MB 4933ms 57ms cpython 3.13.2

Input: 250000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 3.chpl 159ms 3.1ms 48.9MB 140ms 10ms chpl 1.31.0
python 1.py 330ms 3.2ms 85.6MB 293ms 20ms pypy 3.10.16
python 1.py 497ms 6.0ms 29.8MB 463ms 17ms pyston 3.8.12
python 1.py 606ms 2.2ms 30.7MB 573ms 20ms cpython 3.13.2

secp256k1

Input: 2000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1.chpl 1172ms 4.9ms 29.2MB 1167ms 0ms chpl 1.31.0
python 1.py 3178ms 4.3ms 8.3MB 3167ms 0ms pyston 3.8.12
python 1.py 3503ms 25ms 74.3MB 3470ms 20ms pypy 3.10.16
python 1.py 3792ms 25ms 8.6MB 3780ms 0ms cpython 3.13.2

Input: 500

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1.chpl 314ms 9.4ms 29.2MB 310ms 0ms chpl 1.31.0
python 1.py 811ms 3.4ms 8.3MB 800ms 0ms pyston 3.8.12
python 1.py 973ms 13ms 8.6MB 963ms 0ms cpython 3.13.2
python 1.py 974ms 6.2ms 67.3MB 940ms 20ms pypy 3.10.16

spectral-norm

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1-m.chpl 1917ms 12ms 28.9MB 3807ms 0ms chpl 1.31.0
chapel 1.chpl 3719ms 32ms 28.8MB 3710ms 0ms chpl 1.31.0
python 8.py timeout 0.0ms 14.9MB 40ms 10ms cpython 3.13.2
python 8.py timeout 0.0ms 95.4MB 790ms 77ms pypy 3.10.16
python 8.py timeout 0.0ms 14.2MB 37ms 13ms pyston 3.8.12

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1-m.chpl 489ms 4.6ms 29.0MB 953ms 0ms chpl 1.31.0
chapel 1.chpl 934ms 6.5ms 28.8MB 927ms 0ms chpl 1.31.0
python 8.py timeout 0.0ms 14.4MB 43ms 10ms cpython 3.13.2
python 8.py timeout 0.0ms 96.7MB 1313ms 177ms pypy 3.10.16
python 8.py timeout 0.0ms 13.7MB 53ms 20ms pyston 3.8.12

Input: 2000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1-m.chpl 134ms 2.1ms 28.9MB 240ms 0ms chpl 1.31.0
chapel 1.chpl 248ms 6.1ms 28.8MB 243ms 0ms chpl 1.31.0
python 8-m.py 1974ms 19ms 92.9MB 6383ms 260ms pypy 3.10.16
python 8.py timeout 0.0ms 14.0MB 90ms 20ms cpython 3.13.2
python 8.py timeout 0.0ms 13.1MB 123ms 37ms pyston 3.8.12