Ruby Benchmarks

Details for Benchmarks at 2026-01-16 00:44:08 UTC

YJIT metrics from the ruby-bench suite using Ruby 5d2fd5088d.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 95.3% faster than CRuby 4.1.0dev
  • 3.0% faster than YJIT 3.4.7
On railsbench it is
  • 117.4% faster than CRuby 4.1.0dev
  • 10.6% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 17 minutes
aarch64 runtime: 7 hours, 11 minutes

Performance on Headline Benchmarks

Speed of each Ruby implementation relative to the baseline CRuby measurement. Higher is better.

Memory Usage on Headline Benchmarks

Memory usage of each Ruby implementation relative to the baseline CRuby measurement. Lower is better.

Performance on Other Benchmarks

Speed of each Ruby implementation relative to the baseline CRuby measurement. Higher is better.

Memory Usage on Other Benchmarks

Memory usage of each Ruby implementation relative to the baseline CRuby measurement. Lower is better.

Performance on MicroBenchmarks

Speed of each Ruby implementation relative to the baseline CRuby measurement. Higher is better.

Memory Usage on MicroBenchmarks

Memory usage of each Ruby implementation relative to the baseline CRuby measurement. Lower is better.

Want Raw Graphs and CSV?

Benchmarks Speed Details

Benchmark Memory Usage Details

Number of Iterations and Warmups Tested

bench CRuby 3.4.7 warmups CRuby 3.4.7 iters CRuby 4.1.0dev warmups CRuby 4.1.0dev iters YJIT 3.4.7 warmups YJIT 3.4.7 iters YJIT 4.1.0dev warmups YJIT 4.1.0dev iters
activerecord 5 91 5 96 50 196 50 222
chunky-png 5 31 5 32 50 33 50 30
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 418 5 428 50 624 50 628
liquid-compile 5 417 5 461 50 670 50 710
liquid-render 5 171 5 172 50 435 50 438
mail 5 194 5 190 50 253 50 260
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 153 5 157 50 247 50 251
ruby-lsp 5 155 5 163 50 225 50 232
sequel 5 425 5 424 50 597 50 591
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 26 50 12 50 10
addressable-getters 5 164 5 168 50 183 50 193
addressable-join 5 74 5 75 50 66 50 70
addressable-merge 5 159 5 156 50 222 50 222
addressable-new 5 354 5 346 50 526 50 517
addressable-normalize 5 53 5 52 50 59 50 57
addressable-parse 5 103 5 105 50 104 50 107
addressable-setters 5 185 5 180 50 229 50 225
addressable-to-s 5 164 5 169 50 183 50 189
binarytrees 5 82 5 81 50 136 50 128
blurhash 5 83 5 87 50 143 50 144
erubi 5 133 5 149 50 136 50 145
etanni 5 98 5 70 50 71 50 34
fannkuchredux 5 54 5 58 50 102 50 107
fluentd 5 60 5 65 50 20 50 28
graphql 5 372 5 452 50 573 50 938
graphql-native 5 59 5 85 50 23 50 66
knucleotide 5 164 5 156 50 117 50 110
lee 5 23 5 22 50 10 50 10
matmul 5 51 5 56 50 94 50 96
nbody 5 247 5 270 50 676 50 666
nqueens 5 116 5 129 50 555 50 593
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 183 50 706 50 704
protoboeuf-encode 5 193 5 207 50 829 50 778
rack 5 440 5 447 50 710 50 679
ruby-json 5 82 5 97 50 51 50 70
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
sudoku 5 48 5 49 50 156 50 163
tinygql 5 42 5 43 50 36 50 46
30k_ifelse 5 28 5 28 50 185 50 184
30k_methods 5 38 5 40 50 456 50 451
attr_accessor 5 157 5 221 50 1816 50 1954
cfunc_itself 5 348 5 347 50 1255 50 1259
fib 5 124 5 144 50 939 50 939
getivar 5 215 5 331 50 2312 50 2435
getivar-module 5 104 5 145 50 90 50 271
keyword_args 5 100 5 106 50 1240 50 1243
loops-times 5 23 5 26 50 64 50 60
object-new 5 268 5 366 50 299 50 685
respond_to 5 139 5 136 50 3886 50 3900
ruby-xor 5 237 5 251 50 1314 50 1290
send_bmethod 5 115 5 123 50 5539 50 4528
send_cfunc_block 5 106 5 107 50 353 50 339
send_rubyfunc_block 5 249 5 247 50 6920 50 6927
setivar 5 360 5 485 50 4925 50 5044
setivar_object 5 341 5 303 50 749 50 529
setivar_young 5 341 5 307 50 795 50 554
str_concat 5 391 5 452 50 1198 50 1204
structaref 5 156 5 220 50 1810 50 1928
structaset 5 202 5 270 50 396 50 504
throw 5 1085 5 1257 50 1419 50 1545

Different Ruby configurations want different amounts of warmup. With no JIT, CRuby needs hardly any. YJIT warms up fairly quickly, while some JITs may start slower as they do more advanced compilation.

Benchmark YJIT Stats

Hover your cursor over the benchmark names for descriptions of each benchmark.

bench Exit Report Inline Outlined Comp iSeqs Comp Blocks Inval Inval Ratio Bind Alloc Bind Set Const Bumps Compile Time MS
activerecord (click) 1537250 1357240 203 2641 0 0% 0 0 74.193521
chunky-png (click) 320961 320745 79 1374 1 0% 0 0 38.711342
erubi-rails (click) 1366975 1168541 268 3666 22 0% 0 0 97.095998
hexapdf (click) 1523146 1280956 593 15685 44 0% 0 0 437.564591
liquid-c (click) 558094 530529 114 2231 5 0% 0 0 58.841543
liquid-compile (click) 480099 456504 146 2691 2 0% 0 0 77.500676
liquid-render (click) 664496 604978 131 2950 8 0% 0 0 78.935383
mail (click) 865948 851591 345 7700 40 0% 0 0 211.983094
psych-load (click) 288030 265460 61 829 2 0% 0 0 23.644712
railsbench (click) 3342625 2959586 1591 19714 97 0% 0 0 548.365118
rubocop (click) 5756671 4976638 3002 56846 126 0% 6 0 1649.604598
ruby-lsp (click) 1028887 822925 407 7384 46 0% 1 0 203.294725
sequel (click) 501013 436977 11 119 0 0% 0 0 3.889213
shipit (click) 7256223 6117430 3382 53692 169 0% 1 0 1778.257905
addressable-equality (click) 318251 262032 44 1405 1 0% 0 0 34.617358
addressable-getters (click) 274466 257080 26 863 0 0% 0 0 20.904064
addressable-join (click) 284152 254298 24 941 0 0% 0 0 23.341787
addressable-merge (click) 282467 255130 27 896 0 0% 0 0 21.92836
addressable-new (click) 258097 204259 21 569 0 0% 0 0 14.232859
addressable-normalize (click) 312045 288014 43 1326 1 0% 0 0 32.535566
addressable-parse (click) 280058 246182 26 880 0 0% 0 0 21.537931
addressable-setters (click) 257933 198014 20 584 0 0% 0 0 14.673492
addressable-to-s (click) 276944 235049 26 849 0 0% 0 0 20.68838
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.799284
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.980728
erubi (click) 247711 214597 6 132 0 0% 0 0 3.90829
etanni (click) 32837 27420 8 111 0 0% 0 0 3.455022
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.959847
fluentd (click) 483282 416084 7 115 0 0% 0 0 3.705281
graphql (click) 409651 384777 73 1912 19 0% 0 0 53.360322
graphql-native (click) 343244 330382 39 532 0 0% 0 0 14.042598
knucleotide (click) 9663 10633 7 107 0 0% 0 0 4.826559
lee (click) 316935 303405 49 1088 0 0% 0 0 31.154584
matmul (click) 11103 4709 8 136 0 0% 0 0 4.204476
nbody (click) 14448 21176 6 251 0 0% 0 0 6.083673
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.408705
optcarrot (click) 326157 307271 188 4744 34 0% 0 0 110.819104
protoboeuf (click) 169555 177006 12 2829 0 0% 0 0 71.631742
protoboeuf-encode (click) 242967 283659 14 1815 0 0% 0 0 43.977029
rack (click) 280117 255980 35 580 0 0% 0 0 15.055844
ruby-json (click) 20323 18532 8 206 0 0% 0 0 5.683517
rubyboy (click) 704645 663801 154 6873 42 0% 0 0 166.314535
rubykon (click) 149025 157510 137 2107 3 0% 0 0 56.842888
sudoku (click) 51704 65882 7 870 0 0% 0 0 23.012957
tinygql (click) 300728 271552 59 1031 5 0% 0 0 27.026191
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1935.079993
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 488.403331
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.038528
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.490485
fib (click) 2659 2995 3 30 0 0% 0 0 1.13776
getivar (click) 3789 6778 3 79 0 0% 0 0 1.904413
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.299349
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.818657
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.910451
object-new (click) 2406 2818 2 36 0 0% 0 0 1.090837
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.153101
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.790965
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.81663
send_cfunc_block (click) 14429 12201 5 192 0 0% 0 0 4.092613
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.472667
setivar (click) 2783 3726 3 46 0 0% 0 0 1.283198
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.431507
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.712271
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.383926
structaref (click) 4407 9095 3 88 0 0% 0 0 2.334528
structaset (click) 4113 5834 3 70 0 0% 0 0 1.750407
throw (click) 5953 4624 5 53 0 0% 0 0 1.821018

YJIT stats correspond to the YJIT stats exit report.

Note: currently, all stats are collected on x86_64, not ARM.

Raw JSON data files

All graphs and table data in this page comes from processing these data files, which come from benchmark runs.