Chapel VS Ruby benchmarks

Current benchmark data was generated on Wed Feb 08 2023, full log can be found HERE

CONTRIBUTIONS are WELCOME!

[x86_64][2 cores] Intel(R) Xeon(R) Platinum 8171M 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
chapel 4.chpl 2946ms 5.9ms 64.3MB 2910ms 20ms chpl 1.29.0
chapel 3.chpl 3233ms 39ms 64.3MB 3197ms 17ms chpl 1.29.0
ruby 1.rb timeout 0.0ms 72.6MB 4940ms 40ms ruby 3.2.0
ruby 1.rb timeout 0.0ms 82.1MB 4923ms 57ms ruby/yjit 3.2.0
ruby 1.rb timeout 0.0ms 471.3MB 8477ms 293ms truffleruby 22.3.1

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 4.chpl 279ms 2.6ms 34.3MB 260ms 7ms chpl 1.29.0
chapel 3.chpl 294ms 2.5ms 32.1MB 270ms 7ms chpl 1.29.0
ruby 1.rb 718ms 9.3ms 40.7MB 673ms 30ms ruby/yjit 3.2.0
ruby 1.rb 1269ms 18ms 40.3MB 1233ms 20ms ruby 3.2.0
ruby 1-m.rb 1341ms 27ms 400.1MB 2230ms 170ms truffleruby 22.3.1

coro-prime-sieve

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
ruby 1.rb 4296ms 59ms 82.8MB 4203ms 77ms ruby/yjit 3.2.0
chapel 1-m.chpl 4803ms 115ms 83.5MB 9277ms 70ms chpl 1.29.0
ruby 1.rb timeout 0.0ms 81.5MB 4900ms 73ms ruby 3.2.0
ruby 1.rb timeout 0.0ms 1103.9MB 4400ms 1323ms truffleruby 22.3.1

Input: 1000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
ruby 1.rb 292ms 1.0ms 44.9MB 247ms 33ms ruby/yjit 3.2.0
ruby 1.rb 341ms 17ms 44.5MB 290ms 33ms ruby 3.2.0
chapel 1-m.chpl 348ms 12ms 48.1MB 623ms 20ms chpl 1.29.0
ruby 1.rb timeout 0.0ms 1096.9MB 4293ms 1420ms truffleruby 22.3.1

edigits

Input: 250001

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1.chpl 104ms 0.6ms 18.5MB 90ms 0ms chpl 1.29.0

Input: 100000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1.chpl 46ms 3.8ms 34.1MB 37ms 0ms chpl 1.29.0

fasta

Input: 2500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 5-m.chpl 164ms 5.7ms 32.0MB 277ms 3ms chpl 1.29.0
ruby 6.rb 2828ms 11ms 43.6MB 2787ms 27ms ruby/yjit 3.2.0
ruby 6-m.rb 3219ms 20ms 392.0MB 5753ms 340ms truffleruby 22.3.1
ruby 6.rb timeout 0.0ms 42.9MB 4957ms 23ms ruby 3.2.0

Input: 250000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 5.chpl 33ms 3.1ms 22.0MB 30ms 7ms chpl 1.29.0
ruby 6.rb 368ms 4.1ms 35.0MB 337ms 17ms ruby/yjit 3.2.0
ruby 6.rb 594ms 3.7ms 34.4MB 557ms 17ms ruby 3.2.0
ruby 6-m.rb 1035ms 11ms 324.2MB 1757ms 143ms truffleruby 22.3.1

helloworld

Input: QwQ

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1.chpl 17ms 1.4ms 22.2MB 7ms 3ms chpl 1.29.0
ruby 1.rb 54ms 1.8ms 153.4MB 30ms 28ms truffleruby 22.3.1
ruby 1.rb 87ms 1.1ms 32.1MB 52ms 18ms ruby 3.2.0
ruby 1.rb 91ms 4.1ms 32.3MB 64ms 14ms ruby/yjit 3.2.0

knucleotide

Input: 2500000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 3-m.chpl 1180ms 16ms 85.0MB 2157ms 33ms chpl 1.29.0

Input: 250000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 3-m.chpl 201ms 2.7ms 76.7MB 310ms 23ms chpl 1.29.0

nbody

Input: 5000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 2.chpl 485ms 2.4ms 22.2MB 467ms 7ms chpl 1.29.0
ruby 2.rb 1435ms 12ms 298.5MB 1713ms 100ms truffleruby 22.3.1
ruby 2.rb timeout 0.0ms 32.2MB 4970ms 13ms ruby 3.2.0
ruby 2.rb timeout 0.0ms 33.0MB 4963ms 13ms ruby/yjit 3.2.0

Input: 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 2.chpl 70ms 1.7ms 32.2MB 47ms 7ms chpl 1.29.0
ruby 2-m.rb 513ms 25ms 309.9MB 770ms 127ms truffleruby 22.3.1
ruby 2.rb 2528ms 32ms 33.1MB 2487ms 23ms ruby/yjit 3.2.0
ruby 2.rb 4072ms 73ms 32.2MB 4043ms 13ms ruby 3.2.0

pidigits

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 2.chpl 582ms 3.7ms 30.1MB 560ms 3ms chpl 1.29.0
ruby 1.rb timeout 0.0ms 159.1MB 4913ms 67ms ruby 3.2.0
ruby 1.rb timeout 0.0ms 159.8MB 4903ms 73ms ruby/yjit 3.2.0
ruby 1.rb timeout 0.0ms 430.8MB 9380ms 223ms truffleruby 22.3.1

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 2.chpl 151ms 2.2ms 20.8MB 130ms 3ms chpl 1.29.0
ruby 1-m.rb 2551ms 7.6ms 419.5MB 4673ms 190ms truffleruby 22.3.1
ruby 1.rb 3739ms 3.7ms 158.8MB 3630ms 87ms ruby/yjit 3.2.0
ruby 1.rb 3746ms 14ms 158.0MB 3647ms 80ms ruby 3.2.0

regex-redux

Input: 2500000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 3.chpl 2230ms 32ms 221.7MB 2030ms 187ms chpl 1.29.0

Input: 250000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 3.chpl 241ms 0.5ms 50.8MB 203ms 20ms chpl 1.29.0

secp256k1

Input: 2000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1.chpl 1778ms 5.0ms 32.4MB 1753ms 10ms chpl 1.29.0

Input: 500

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1.chpl 461ms 0.8ms 32.4MB 447ms 3ms chpl 1.29.0

spectral-norm

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1-m.chpl 2324ms 13ms 32.3MB 4533ms 10ms chpl 1.29.0
chapel 1.chpl 4465ms 18ms 32.4MB 4443ms 7ms chpl 1.29.0
ruby 4.rb timeout 0.0ms 32.2MB 4967ms 10ms ruby 3.2.0
ruby 4.rb timeout 0.0ms 32.9MB 4973ms 13ms ruby/yjit 3.2.0
ruby 4.rb timeout 0.0ms 404.5MB 5227ms 213ms truffleruby 22.3.1

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1-m.chpl 654ms 50ms 32.3MB 1177ms 10ms chpl 1.29.0
chapel 1.chpl 1147ms 4.0ms 32.3MB 1130ms 3ms chpl 1.29.0
ruby 4.rb timeout 0.0ms 32.2MB 4970ms 17ms ruby 3.2.0
ruby 4.rb timeout 0.0ms 32.8MB 4957ms 20ms ruby/yjit 3.2.0
ruby 4.rb timeout 0.0ms 460.5MB 5583ms 183ms truffleruby 22.3.1

Input: 2000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
chapel 1-m.chpl 179ms 4.2ms 32.3MB 300ms 10ms chpl 1.29.0
chapel 1.chpl 309ms 5.9ms 32.3MB 287ms 7ms chpl 1.29.0
ruby 4.rb 3275ms 18ms 360.5MB 3963ms 167ms truffleruby 22.3.1
ruby 4.rb timeout 0.0ms 32.0MB 4960ms 23ms ruby 3.2.0
ruby 4.rb timeout 0.0ms 32.9MB 4967ms 10ms ruby/yjit 3.2.0