Ruby Benchmarks

Details for Benchmarks at 2026-01-27 00:46:03 UTC

YJIT metrics from the ruby-bench suite using Ruby 491e38902c.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 94.0% faster than CRuby 4.1.0dev
  • 5.2% faster than YJIT 3.4.7
On railsbench it is
  • 113.1% faster than CRuby 4.1.0dev
  • 10.3% 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 99 50 197 50 237
chunky-png 5 32 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 421 5 423 50 625 50 640
liquid-compile 5 416 5 480 50 585 50 709
liquid-render 5 172 5 177 50 433 50 449
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 190 50 253 50 261
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 159 50 247 50 255
ruby-lsp 5 160 5 162 50 223 50 230
sequel 5 419 5 428 50 600 50 621
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 27 50 12 50 11
addressable-getters 5 163 5 168 50 183 50 192
addressable-join 5 74 5 77 50 66 50 70
addressable-merge 5 160 5 158 50 222 50 219
addressable-new 5 353 5 353 50 521 50 515
addressable-normalize 5 53 5 53 50 59 50 59
addressable-parse 5 103 5 105 50 104 50 107
addressable-setters 5 184 5 184 50 231 50 229
addressable-to-s 5 163 5 170 50 182 50 194
binarytrees 5 82 5 86 50 136 50 146
blurhash 5 83 5 87 50 143 50 145
erubi 5 137 5 149 50 137 50 146
etanni 5 99 5 72 50 71 50 38
fannkuchredux 5 54 5 56 50 101 50 105
fluentd 5 56 5 65 50 20 50 26
graphql 5 366 5 468 50 569 50 905
graphql-native 5 59 5 88 50 20 50 68
knucleotide 5 162 5 163 50 117 50 117
lee 5 23 5 23 50 10 50 10
matmul 5 51 5 56 50 94 50 96
nbody 5 247 5 281 50 677 50 704
nqueens 5 116 5 126 50 556 50 574
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 187 50 706 50 780
protoboeuf-encode 5 197 5 204 50 833 50 818
rack 5 439 5 460 50 707 50 714
ruby-json 5 81 5 99 50 46 50 73
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 156
tinygql 5 42 5 43 50 40 50 51
30k_ifelse 5 28 5 28 50 185 50 184
30k_methods 5 38 5 40 50 456 50 457
attr_accessor 5 157 5 217 50 1836 50 1948
cfunc_itself 5 345 5 353 50 1255 50 1259
fib 5 124 5 137 50 939 50 940
getivar 5 216 5 327 50 2316 50 2432
getivar-module 5 104 5 144 50 90 50 271
keyword_args 5 100 5 107 50 1240 50 1243
loops-times 5 23 5 26 50 64 50 62
object-new 5 268 5 381 50 298 50 744
respond_to 5 139 5 139 50 3891 50 3902
ruby-xor 5 237 5 249 50 1314 50 1284
send_bmethod 5 116 5 121 50 5538 50 4528
send_cfunc_block 5 106 5 107 50 353 50 346
send_rubyfunc_block 5 250 5 251 50 6923 50 6927
setivar 5 359 5 480 50 4923 50 5040
setivar_object 5 341 5 298 50 751 50 538
setivar_young 5 341 5 301 50 799 50 560
str_concat 5 391 5 452 50 1202 50 1166
structaref 5 156 5 203 50 1807 50 1890
structaset 5 200 5 258 50 396 50 482
throw 5 1087 5 1320 50 1406 50 1668

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) 1543276 1304399 203 2626 0 0% 0 0 74.457993
chunky-png (click) 320926 304361 79 1374 1 0% 0 0 38.982064
erubi-rails (click) 1366980 1110772 268 3652 22 0% 0 0 97.200209
hexapdf (click) 1523975 1313191 594 15674 44 0% 0 0 436.423016
liquid-c (click) 558061 522337 114 2231 5 0% 0 0 60.507589
liquid-compile (click) 479642 455474 146 2716 2 0% 0 0 78.888872
liquid-render (click) 663386 570456 131 2950 8 0% 0 0 80.189721
lobsters (click) 8671525 7262982 3125 63930 120 0% 0 0 2119.858673
mail (click) 865945 794308 345 7700 40 0% 0 0 214.689892
psych-load (click) 288093 249195 61 829 2 0% 0 0 23.85225
railsbench (click) 3341800 2867219 1591 19723 97 0% 0 0 553.28091
rubocop (click) 5757038 4993286 3002 56852 125 0% 6 0 1663.156731
ruby-lsp (click) 1039627 914989 407 7369 46 0% 1 0 204.836626
sequel (click) 499063 394862 11 119 0 0% 0 0 3.928678
shipit (click) 7256499 6136580 3381 53689 169 0% 1 0 1795.285403
addressable-equality (click) 317554 301905 44 1404 1 0% 0 0 34.769304
addressable-getters (click) 277303 252479 26 863 0 0% 0 0 20.998896
addressable-join (click) 282677 252780 24 941 0 0% 0 0 23.844097
addressable-merge (click) 281963 270386 27 896 0 0% 0 0 22.173323
addressable-new (click) 258173 195874 21 591 0 0% 0 0 14.887102
addressable-normalize (click) 313057 272002 43 1345 1 0% 0 0 33.066372
addressable-parse (click) 279800 269947 26 886 0 0% 0 0 22.012034
addressable-setters (click) 256280 212288 20 584 0 0% 0 0 14.612964
addressable-to-s (click) 276166 266481 26 849 0 0% 0 0 20.599085
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.814352
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.119411
erubi (click) 247678 230981 6 132 0 0% 0 0 3.878026
etanni (click) 32837 27420 8 111 0 0% 0 0 3.463644
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.034288
fluentd (click) 483506 424552 7 115 0 0% 0 0 3.839247
graphql (click) 402947 387206 73 1895 19 1% 0 0 54.06705
graphql-native (click) 351424 331644 39 532 0 0% 0 0 14.152364
knucleotide (click) 9663 10633 7 107 0 0% 0 0 4.909471
lee (click) 316935 295242 49 1088 0 0% 0 0 31.280686
matmul (click) 11103 4709 8 136 0 0% 0 0 4.271231
nbody (click) 14448 21176 6 251 0 0% 0 0 6.144643
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.385952
optcarrot (click) 326157 307271 188 4744 34 0% 0 0 111.3763
protoboeuf (click) 169555 177006 12 2829 0 0% 0 0 71.550092
protoboeuf-encode (click) 242967 283659 14 1815 0 0% 0 0 44.390577
rack (click) 282632 260019 35 627 0 0% 0 0 16.603374
ruby-json (click) 20323 18532 8 206 0 0% 0 0 5.730665
rubyboy (click) 706012 632422 154 6871 42 0% 0 0 167.504461
rubykon (click) 147478 130977 137 2088 3 0% 0 0 56.731671
sudoku (click) 51704 65882 7 870 0 0% 0 0 23.087432
tinygql (click) 299904 261955 59 1031 5 0% 0 0 26.951649
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1943.511171
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 489.356626
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.091238
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.465777
fib (click) 2659 2995 3 30 0 0% 0 0 1.126154
getivar (click) 3789 6778 3 79 0 0% 0 0 1.936261
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.314136
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.820131
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.888556
object-new (click) 2406 2818 2 36 0 0% 0 0 1.180213
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.146884
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.891228
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.826154
send_cfunc_block (click) 14429 12201 5 192 0 0% 0 0 4.15505
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.48091
setivar (click) 2783 3726 3 46 0 0% 0 0 1.261687
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.394002
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.732916
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.423104
structaref (click) 4407 9095 3 88 0 0% 0 0 2.323036
structaset (click) 4113 5834 3 70 0 0% 0 0 1.760999
throw (click) 5953 4624 5 53 0 0% 0 0 1.84284

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.