All Ruby benchmarks

Current benchmark data was generated on Tue Jan 18 2022, full log can be found HERE

CONTRIBUTIONS are WELCOME!

[x86_64][2 cores] Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz

binarytrees

Input: 14

code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
1.rb 529ms 5.3ms 37.8MB 483ms 30ms ruby 3.1.0
1.rb 566ms 3.6ms 292.4MB 410ms 140ms ruby/yjit 3.1.0
1.rb 577ms 64ms 36.2MB 1007ms 77ms ruby/mjit 3.1.0
1.rb 879ms 4.6ms 640.0MB 1397ms 253ms truffleruby 21.3.0

coro-prime-sieve

Input: 4000

code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
1.rb 3164ms 43ms 337.0MB 2960ms 187ms ruby/yjit 3.1.0
1.rb 3562ms 92ms 80.4MB 3487ms 63ms ruby 3.1.0
1.rb 3587ms 109ms 80.9MB 3853ms 117ms ruby/mjit 3.1.0

Input: 1000

code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
1.rb 246ms 2.2ms 42.4MB 207ms 23ms ruby 3.1.0
1.rb 389ms 4.8ms 299.1MB 220ms 153ms ruby/yjit 3.1.0
1.rb 439ms 8.7ms 43.0MB 727ms 67ms ruby/mjit 3.1.0

fasta

Input: 2500000

code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
6.rb 2966ms 60ms 296.2MB 2740ms 173ms ruby/yjit 3.1.0
6.rb 3160ms 31ms 39.7MB 4423ms 250ms ruby/mjit 3.1.0
6.rb 4426ms 30ms 39.6MB 4310ms 43ms ruby 3.1.0

Input: 250000

code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
6.rb 500ms 1.9ms 288.0MB 350ms 137ms ruby/yjit 3.1.0
6.rb 516ms 2.3ms 31.5MB 487ms 13ms ruby 3.1.0
6.rb 598ms 42ms 31.7MB 947ms 87ms ruby/mjit 3.1.0
6.rb 3086ms 621ms 660.9MB 2347ms 450ms truffleruby 21.3.0

helloworld

Input: QwQ

code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
1.rb 34ms 3.8ms 117.6MB 22ms 10ms truffleruby 21.3.0
1.rb 75ms 0.9ms 30.3MB 46ms 14ms ruby 3.1.0
1.rb 229ms 2.6ms 286.9MB 78ms 136ms ruby/yjit 3.1.0
1.rb 411ms 9.5ms 30.6MB 544ms 44ms ruby/mjit 3.1.0

json-serde

Input: sample 5000

code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
1.rb 437ms 1.6ms 49.7MB 407ms 20ms ruby 3.1.0
1.rb 442ms 1.2ms 49.0MB 737ms 73ms ruby/mjit 3.1.0
1.rb 591ms 2.1ms 305.9MB 437ms 143ms ruby/yjit 3.1.0

Input: canada 15

code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
1.rb 3927ms 14ms 163.3MB 4147ms 143ms ruby/mjit 3.1.0
1.rb 3978ms 66ms 161.3MB 3830ms 90ms ruby 3.1.0
1.rb 4087ms 3.1ms 419.9MB 3847ms 223ms ruby/yjit 3.1.0

knucleotide

Input: 250000_in

code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
1.rb 1690ms 16ms 1763.3MB 2763ms 240ms ruby/yjit 3.1.0
1.rb 1709ms 23ms 250.3MB 3110ms 80ms ruby 3.1.0

lru

Input: 5000000

code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
1.rb 2825ms 27ms 916.1MB 3443ms 320ms truffleruby 21.3.0
1.rb 3045ms 28ms 287.9MB 2877ms 153ms ruby/yjit 3.1.0
1.rb 3495ms 490ms 31.9MB 5083ms 180ms ruby/mjit 3.1.0
1.rb 4342ms 39ms 31.5MB 4313ms 13ms ruby 3.1.0

Input: 1000000

code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
1.rb 793ms 3.7ms 288.1MB 640ms 140ms ruby/yjit 3.1.0
1.rb 936ms 15ms 31.4MB 917ms 10ms ruby 3.1.0
1.rb 979ms 23ms 31.8MB 1727ms 153ms ruby/mjit 3.1.0
1.rb 1307ms 43ms 691.2MB 2070ms 267ms truffleruby 21.3.0

Input: 500000

code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
1.rb 503ms 4.7ms 31.4MB 483ms 10ms ruby 3.1.0
1.rb 514ms 3.3ms 288.0MB 353ms 143ms ruby/yjit 3.1.0
1.rb 595ms 8.9ms 31.8MB 1043ms 77ms ruby/mjit 3.1.0
1.rb 1065ms 18ms 662.7MB 1713ms 250ms truffleruby 21.3.0

nbody

Input: 5000000

code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
2.rb 1206ms 7.5ms 553.3MB 1440ms 230ms truffleruby 21.3.0

Input: 500000

code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
2.rb 466ms 4.9ms 521.4MB 680ms 183ms truffleruby 21.3.0
2.rb 2345ms 14ms 287.1MB 2193ms 137ms ruby/yjit 3.1.0
2.rb 2620ms 15ms 30.5MB 4613ms 170ms ruby/mjit 3.1.0
2.rb 3253ms 14ms 30.2MB 3233ms 10ms ruby 3.1.0

Input: 100000

code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
2.rb 324ms 2.2ms 429.1MB 420ms 160ms truffleruby 21.3.0
2.rb 655ms 6.0ms 287.1MB 510ms 130ms ruby/yjit 3.1.0
2.rb 709ms 2.8ms 30.3MB 683ms 7ms ruby 3.1.0
2.rb 1068ms 13ms 30.6MB 1980ms 73ms ruby/mjit 3.1.0

pidigits

Input: 4000

code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
1.rb 2445ms 83ms 658.8MB 3573ms 333ms truffleruby 21.3.0
1.rb 2498ms 4.7ms 164.8MB 2423ms 63ms ruby 3.1.0
1.rb 2652ms 9.3ms 422.8MB 2443ms 193ms ruby/yjit 3.1.0
1.rb 3102ms 419ms 165.7MB 5683ms 343ms ruby/mjit 3.1.0

Input: 1000

code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
1.rb 241ms 1.3ms 57.8MB 207ms 20ms ruby 3.1.0
1.rb 398ms 7.2ms 314.6MB 223ms 160ms ruby/yjit 3.1.0
1.rb 437ms 12ms 58.2MB 713ms 70ms ruby/mjit 3.1.0
1.rb 499ms 20ms 449.2MB 540ms 167ms truffleruby 21.3.0

regex-redux

Input: 250000_in

code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
3.rb 876ms 20ms 62.1MB 447ms 50ms ruby 3.1.0
3.rb 1044ms 5.1ms 318.6MB 487ms 173ms ruby/yjit 3.1.0
3.rb 2346ms 3.2ms 62.4MB 997ms 97ms ruby/mjit 3.1.0

spectral-norm

Input: 4000

code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
4.rb 4946ms 31ms 643.4MB 5493ms 260ms truffleruby 21.3.0

Input: 1000

code time stddev peak-mem mem time(user) time(kernel) compiler compiler/runtime
4.rb 1241ms 18ms 641.0MB 1777ms 280ms truffleruby 21.3.0
4.rb 3458ms 15ms 287.4MB 3300ms 143ms ruby/yjit 3.1.0
4.rb 3819ms 16ms 31.1MB 4530ms 107ms ruby/mjit 3.1.0