Ruby Benchmarks

Details for Benchmarks at 2026-01-26 00:47:33 UTC

YJIT metrics from the ruby-bench suite using Ruby 9269069e90.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 93.6% faster than CRuby 4.1.0dev
  • 5.2% faster than YJIT 3.4.7
On railsbench it is
  • 116.0% faster than CRuby 4.1.0dev
  • 11.1% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 10 minutes
aarch64 runtime: 7 hours, 4 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 90 5 97 50 191 50 227
chunky-png 5 32 5 33 50 32 50 30
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 421 5 426 50 625 50 631
liquid-compile 5 418 5 476 50 585 50 714
liquid-render 5 170 5 175 50 434 50 434
lobsters 5 20 5 20 50 10 50 10
mail 5 195 5 189 50 253 50 256
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 158 50 249 50 254
ruby-lsp 5 159 5 161 50 221 50 227
sequel 5 424 5 436 50 586 50 605
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 26 50 12 50 10
addressable-getters 5 164 5 165 50 183 50 186
addressable-join 5 73 5 77 50 65 50 69
addressable-merge 5 159 5 154 50 221 50 211
addressable-new 5 355 5 344 50 525 50 501
addressable-normalize 5 53 5 52 50 59 50 56
addressable-parse 5 103 5 103 50 105 50 103
addressable-setters 5 183 5 179 50 229 50 218
addressable-to-s 5 162 5 166 50 183 50 184
binarytrees 5 82 5 82 50 136 50 128
blurhash 5 83 5 88 50 143 50 145
erubi 5 136 5 145 50 133 50 143
etanni 5 97 5 69 50 71 50 35
fannkuchredux 5 54 5 57 50 102 50 105
fluentd 5 62 5 64 50 20 50 31
graphql 5 361 5 465 50 575 50 946
graphql-native 5 59 5 86 50 23 50 58
knucleotide 5 163 5 158 50 117 50 111
lee 5 23 5 22 50 10 50 10
matmul 5 51 5 55 50 94 50 96
nbody 5 247 5 275 50 677 50 657
nqueens 5 116 5 125 50 556 50 573
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 185 50 706 50 751
protoboeuf-encode 5 196 5 200 50 836 50 804
rack 5 438 5 449 50 709 50 692
ruby-json 5 82 5 97 50 46 50 72
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
sudoku 5 48 5 49 50 157 50 156
tinygql 5 41 5 44 50 39 50 50
30k_ifelse 5 28 5 28 50 185 50 186
30k_methods 5 38 5 40 50 457 50 452
attr_accessor 5 157 5 201 50 1835 50 1924
cfunc_itself 5 346 5 348 50 1255 50 1259
fib 5 124 5 144 50 940 50 940
getivar 5 216 5 327 50 2318 50 2427
getivar-module 5 104 5 143 50 90 50 270
keyword_args 5 100 5 107 50 1240 50 1243
loops-times 5 23 5 26 50 64 50 60
object-new 5 268 5 364 50 296 50 669
respond_to 5 139 5 140 50 3888 50 3908
ruby-xor 5 236 5 243 50 1314 50 1279
send_bmethod 5 117 5 122 50 5539 50 4527
send_cfunc_block 5 106 5 107 50 353 50 341
send_rubyfunc_block 5 251 5 252 50 6921 50 6926
setivar 5 359 5 456 50 4925 50 5043
setivar_object 5 337 5 301 50 749 50 637
setivar_young 5 341 5 304 50 800 50 659
str_concat 5 391 5 445 50 1200 50 1103
structaref 5 156 5 203 50 1811 50 1900
structaset 5 195 5 274 50 395 50 487
throw 5 1091 5 1257 50 1411 50 1554

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) 1545233 1297981 203 2646 0 0% 0 0 75.929535
chunky-png (click) 320926 304361 79 1374 1 0% 0 0 38.878296
erubi-rails (click) 1361153 1152527 269 3627 22 0% 0 0 97.053162
hexapdf (click) 1521548 1271109 593 15666 44 0% 0 0 437.758581
liquid-c (click) 558720 514769 114 2231 5 0% 0 0 60.150502
liquid-compile (click) 482227 450853 146 2737 2 0% 0 0 79.855323
liquid-render (click) 664686 605184 131 2950 8 0% 0 0 79.063804
lobsters (click) 8678803 7374172 3127 63943 117 0% 0 0 2108.660578
mail (click) 865915 835219 345 7700 40 0% 0 0 212.423147
psych-load (click) 288093 249195 61 829 2 0% 0 0 23.805633
railsbench (click) 3342278 2820313 1591 19683 97 0% 0 0 551.846542
rubocop (click) 5757813 5059606 3002 56859 125 0% 6 0 1659.634884
ruby-lsp (click) 1037751 873921 407 7369 46 0% 1 0 203.417573
sequel (click) 502442 373205 11 119 0 0% 0 0 3.792579
shipit (click) 7107050 6110945 3296 51924 169 0% 0 0 1703.026163
addressable-equality (click) 316879 276801 44 1379 1 0% 0 0 34.357532
addressable-getters (click) 277303 252479 26 863 0 0% 0 0 21.074821
addressable-join (click) 282677 244588 24 941 0 0% 0 0 23.723439
addressable-merge (click) 269259 215703 27 896 0 0% 0 0 22.121443
addressable-new (click) 259007 230081 21 591 0 0% 0 0 14.702467
addressable-normalize (click) 312622 272037 43 1328 1 0% 0 0 32.755596
addressable-parse (click) 280020 254354 26 880 0 0% 0 0 21.740719
addressable-setters (click) 257993 214517 20 584 0 0% 0 0 14.718688
addressable-to-s (click) 277009 235188 26 849 0 0% 0 0 20.628644
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.807652
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.098982
erubi (click) 249115 207898 6 132 0 0% 0 0 3.838463
etanni (click) 32382 26816 8 111 0 0% 0 0 3.451939
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.020548
fluentd (click) 483602 449247 7 115 0 0% 0 0 3.742193
graphql (click) 408576 383602 73 1895 19 1% 0 0 53.479235
graphql-native (click) 353138 333901 39 532 0 0% 0 0 14.094461
knucleotide (click) 9663 10633 7 107 0 0% 0 0 4.840364
lee (click) 316935 287050 49 1088 0 0% 0 0 31.034649
matmul (click) 11103 4709 8 136 0 0% 0 0 4.196771
nbody (click) 14448 21176 6 251 0 0% 0 0 6.16651
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.383259
optcarrot (click) 326157 307271 188 4744 34 0% 0 0 111.742924
protoboeuf (click) 169555 177006 12 2829 0 0% 0 0 72.231908
protoboeuf-encode (click) 242967 283659 14 1815 0 0% 0 0 44.261996
rack (click) 283009 251315 35 624 0 0% 0 0 16.450235
ruby-json (click) 20323 18532 8 206 0 0% 0 0 5.726485
rubyboy (click) 704570 614565 154 6871 42 0% 0 0 167.60661
rubykon (click) 147885 147937 137 2093 3 0% 0 0 56.599555
sudoku (click) 51704 65882 7 870 0 0% 0 0 23.211578
tinygql (click) 300693 271592 59 1031 5 0% 0 0 27.398864
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1955.174595
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 492.125641
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.094665
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.54667
fib (click) 2659 2995 3 30 0 0% 0 0 1.143589
getivar (click) 3789 6778 3 79 0 0% 0 0 1.935284
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.277772
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.842904
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.888441
object-new (click) 2406 2818 2 36 0 0% 0 0 1.109244
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.162147
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.828416
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.822046
send_cfunc_block (click) 14429 12201 5 192 0 0% 0 0 4.18674
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.454609
setivar (click) 2783 3726 3 46 0 0% 0 0 1.296454
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.378248
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.748074
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.42862
structaref (click) 4407 9095 3 88 0 0% 0 0 2.323823
structaset (click) 4113 5834 3 70 0 0% 0 0 1.796037
throw (click) 5953 4624 5 53 0 0% 0 0 1.761472

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.