Chapel VS Python benchmarks

Current benchmark data was generated on Wed May 25 2022, full log can be found HERE

CONTRIBUTIONS are WELCOME!

[x86_64][2 cores] Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz (Model 85)

* -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 1831ms 34ms 220.3MB 1667ms 147ms pypy 3.8.13
chapel 4.chpl 2509ms 8.4ms 66.1MB 2477ms 20ms chpl 1.26.0
chapel 3.chpl 2721ms 5.2ms 64.1MB 2687ms 23ms chpl 1.26.0
python 1.py timeout 0.0ms 0.0MB 0ms 0ms cpython 3.10.4
python 1.py timeout 0.0ms 0.0MB 0ms 0ms pyston 3.8.12

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
python 1.py 140ms 3.4ms 78.6MB 107ms 20ms pypy 3.8.13
chapel 4.chpl 234ms 1.7ms 34.1MB 213ms 10ms chpl 1.26.0
chapel 3.chpl 245ms 1.0ms 36.1MB 230ms 3ms chpl 1.26.0
python 1.py 682ms 3.3ms 12.4MB 657ms 7ms pyston 3.8.12
python 1.py 1619ms 7.5ms 11.8MB 1603ms 0ms cpython 3.10.4

coro-prime-sieve

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
python 1.py 1538ms 8.5ms 221.3MB 1423ms 100ms pypy 3.8.13
chapel 1-m.chpl 4218ms 372ms 111.4MB 7983ms 47ms chpl 1.26.0
python 1.py timeout 0.0ms 0.0MB 0ms 0ms cpython 3.10.4
python 1.py timeout 0.0ms 0.0MB 0ms 0ms pyston 3.8.12

Input: 1000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1-m.chpl 289ms 3.3ms 44.2MB 510ms 23ms chpl 1.26.0
python 1.py 312ms 8.1ms 90.4MB 270ms 23ms pypy 3.8.13
python 1.py 864ms 4.1ms 17.2MB 843ms 0ms pyston 3.8.12
python 1.py 910ms 2.7ms 17.0MB 887ms 7ms cpython 3.10.4

edigits

Input: 250001

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1.chpl 92ms 1.1ms 36.1MB 70ms 10ms chpl 1.26.0
python 1.py 753ms 3.4ms 82.9MB 707ms 27ms pypy 3.8.13
python 1.py 2245ms 159ms 9.3MB 2230ms 0ms cpython 3.10.4
python 1.py 2294ms 0.4ms 10.0MB 2283ms 0ms pyston 3.8.12

Input: 100000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1.chpl 46ms 0.8ms 34.1MB 27ms 7ms chpl 1.26.0
python 1.py 199ms 12ms 76.2MB 163ms 17ms pypy 3.8.13
python 1.py 404ms 0.7ms 9.1MB 390ms 0ms pyston 3.8.12
python 1.py 419ms 0.5ms 8.5MB 407ms 0ms cpython 3.10.4

fasta

Input: 2500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 5-m.chpl 135ms 2.9ms 32.0MB 220ms 7ms chpl 1.26.0
python 1.py 2907ms 44ms 89.2MB 2870ms 23ms pypy 3.8.13
python 5-m.py 3562ms 19ms 12.9MB 5000ms 1320ms pyston 3.8.12
python 1.py 4022ms 316ms 8.2MB 4003ms 3ms pyston 3.8.12
python 5-m.py 4407ms 159ms 12.1MB 6360ms 1213ms cpython 3.10.4
python 1.py timeout 0.0ms 0.0MB 0ms 0ms cpython 3.10.4
python 5-m.py timeout 0.0ms 0.0MB 0ms 0ms pypy 3.8.13

Input: 250000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 5.chpl 30ms 1.5ms 32.0MB 27ms 3ms chpl 1.26.0
python 1.py 368ms 2.0ms 75.5MB 337ms 17ms pypy 3.8.13
python 5-m.py 432ms 6.5ms 12.9MB 537ms 173ms pyston 3.8.12
python 1.py 434ms 31ms 8.2MB 420ms 0ms pyston 3.8.12
python 5-m.py 545ms 3.4ms 12.1MB 683ms 197ms cpython 3.10.4
python 1.py 678ms 48ms 7.7MB 663ms 0ms cpython 3.10.4
python 5-m.py 910ms 3.9ms 78.8MB 1063ms 467ms pypy 3.8.13

helloworld

Input: QwQ

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
python 1.py 14ms 1.8ms 7.6MB 10ms 0ms pyston 3.8.12
python 1.py 16ms 2.8ms 7.3MB 10ms 0ms cpython 3.10.4
chapel 1.chpl 18ms 1.8ms 32.4MB 2ms 8ms chpl 1.26.0
python 1.py 37ms 1.1ms 54.6MB 12ms 10ms pypy 3.8.13

knucleotide

Input: 2500000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 3-m.chpl 982ms 4.5ms 99.0MB 1783ms 33ms chpl 1.26.0
python 3-m.py 4821ms 7.2ms 212.7MB 8583ms 417ms pypy 3.8.13
python 3.py timeout 0.0ms 0.0MB 0ms 0ms cpython 3.10.4
python 3.py timeout 0.0ms 0.0MB 0ms 0ms pyston 3.8.12

Input: 250000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 3-m.chpl 168ms 1.4ms 88.3MB 243ms 30ms chpl 1.26.0
python 3-m.py 665ms 7.3ms 88.7MB 983ms 137ms pypy 3.8.13
python 3-m.py 668ms 5.8ms 16.2MB 1170ms 37ms pyston 3.8.12
python 3-m.py 965ms 12ms 15.3MB 1743ms 37ms cpython 3.10.4

nbody

Input: 5000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 2.chpl 406ms 1.2ms 32.4MB 383ms 7ms chpl 1.26.0
python 2.py 2271ms 62ms 74.5MB 2243ms 13ms pypy 3.8.13
python 1.py timeout 0.0ms 0.0MB 0ms 0ms cpython 3.10.4
python 2.py timeout 0.0ms 0.0MB 0ms 0ms cpython 3.10.4
python 1.py timeout 0.0ms 0.0MB 0ms 0ms pypy 3.8.13
python 1.py timeout 0.0ms 0.0MB 0ms 0ms pyston 3.8.12
python 2.py timeout 0.0ms 0.0MB 0ms 0ms pyston 3.8.12

Input: 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 2.chpl 61ms 1.2ms 32.4MB 40ms 7ms chpl 1.26.0
python 2.py 294ms 5.0ms 74.1MB 253ms 27ms pypy 3.8.13
python 1.py 583ms 1.7ms 73.4MB 557ms 13ms pypy 3.8.13
python 1.py 1420ms 106ms 8.7MB 1407ms 0ms pyston 3.8.12
python 2.py 2057ms 12ms 8.5MB 2043ms 0ms pyston 3.8.12
python 1.py timeout 0.0ms 0.0MB 0ms 0ms cpython 3.10.4
python 2.py timeout 0.0ms 0.0MB 0ms 0ms cpython 3.10.4

pidigits

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 2.chpl 487ms 1.8ms 34.1MB 473ms 3ms chpl 1.26.0
python 4.py 2069ms 2.9ms 8.6MB 2037ms 20ms cpython 3.10.4
python 4.py 2237ms 2.1ms 9.4MB 2207ms 10ms pyston 3.8.12
python 4.py 2733ms 28ms 127.6MB 2640ms 73ms pypy 3.8.13

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 2.chpl 129ms 0.5ms 34.1MB 110ms 3ms chpl 1.26.0
python 4.py 502ms 4.7ms 8.4MB 480ms 0ms cpython 3.10.4
python 4.py 535ms 1.2ms 9.1MB 520ms 0ms pyston 3.8.12
python 4.py 702ms 4.2ms 79.7MB 670ms 20ms pypy 3.8.13

regex-redux

Input: 2500000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 3.chpl 2026ms 1.2ms 250.5MB 1817ms 197ms chpl 1.26.0
python 1.py 3387ms 11ms 274.3MB 3267ms 103ms pypy 3.8.13
python 1.py timeout 0.0ms 0.0MB 0ms 0ms cpython 3.10.4
python 1.py timeout 0.0ms 0.0MB 0ms 0ms pyston 3.8.12

Input: 250000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 3.chpl 213ms 0.5ms 56.8MB 190ms 7ms chpl 1.26.0
python 1.py 478ms 2.4ms 98.3MB 430ms 27ms pypy 3.8.13
python 1.py 745ms 2.1ms 30.7MB 697ms 30ms pyston 3.8.12
python 1.py 757ms 1.3ms 30.7MB 723ms 20ms cpython 3.10.4

secp256k1

Input: 2000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1.chpl 1538ms 3.6ms 32.3MB 1520ms 7ms chpl 1.26.0
python 1.py 4296ms 306ms 8.6MB 4283ms 0ms pyston 3.8.12
python 1.py timeout 0.0ms 0.0MB 0ms 0ms cpython 3.10.4
python 1.py timeout 0.0ms 0.0MB 0ms 0ms pypy 3.8.13

Input: 500

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1.chpl 399ms 2.2ms 32.3MB 380ms 7ms chpl 1.26.0
python 1.py 1128ms 4.1ms 8.7MB 1113ms 0ms pyston 3.8.12
python 1.py 1465ms 5.2ms 7.3MB 1450ms 0ms cpython 3.10.4
python 1.py 1600ms 4.0ms 80.0MB 1570ms 17ms pypy 3.8.13

spectral-norm

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1-m.chpl 1899ms 4.4ms 32.4MB 3597ms 7ms chpl 1.26.0
chapel 1.chpl 3781ms 2.3ms 32.4MB 3760ms 7ms chpl 1.26.0
python 8.py timeout 0.0ms 0.0MB 0ms 0ms cpython 3.10.4
python 8.py timeout 0.0ms 0.0MB 0ms 0ms pypy 3.8.13
python 8.py timeout 0.0ms 0.0MB 0ms 0ms pyston 3.8.12

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1-m.chpl 495ms 1.7ms 32.4MB 930ms 7ms chpl 1.26.0
chapel 1.chpl 964ms 0.8ms 32.4MB 950ms 0ms chpl 1.26.0
python 8.py timeout 0.0ms 0.0MB 0ms 0ms cpython 3.10.4
python 8.py timeout 0.0ms 0.0MB 0ms 0ms pypy 3.8.13
python 8.py timeout 0.0ms 0.0MB 0ms 0ms pyston 3.8.12

Input: 2000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1-m.chpl 141ms 3.2ms 32.4MB 233ms 7ms chpl 1.26.0
chapel 1.chpl 257ms 0.8ms 32.4MB 240ms 3ms chpl 1.26.0
python 8-m.py 4206ms 35ms 105.3MB 7317ms 397ms pypy 3.8.13
python 8.py timeout 0.0ms 0.0MB 0ms 0ms cpython 3.10.4
python 8.py timeout 0.0ms 0.0MB 0ms 0ms pyston 3.8.12