Ruby Benchmarks

Details for Benchmarks at 2026-06-24 01:16:00 UTC

YJIT metrics from the ruby-bench suite using Ruby 85348bf157.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 100.3% faster than CRuby 4.1.0dev
  • 9.1% faster than YJIT 3.4.7
On railsbench it is
  • 119.5% faster than CRuby 4.1.0dev
  • 18.3% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 59 minutes
aarch64 runtime: 7 hours, 49 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 201 50 242
chunky-png 5 31 5 30 50 34 50 26
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 421 5 444 50 621 50 677
liquid-compile 5 421 5 509 50 583 50 861
liquid-render 5 171 5 173 50 434 50 469
lobsters 5 20 5 21 50 10 50 10
mail 5 194 5 206 50 254 50 303
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 153 5 155 50 247 50 246
ruby-lsp 5 154 5 159 50 240 50 235
sequel 5 419 5 468 50 588 50 669
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 29 50 12 50 18
addressable-getters 5 164 5 170 50 183 50 212
addressable-join 5 75 5 81 50 66 50 81
addressable-merge 5 160 5 157 50 222 50 242
addressable-new 5 352 5 342 50 518 50 542
addressable-normalize 5 52 5 57 50 60 50 71
addressable-parse 5 104 5 105 50 103 50 119
addressable-setters 5 184 5 184 50 233 50 253
addressable-to-s 5 164 5 169 50 182 50 205
binarytrees 5 82 5 86 50 136 50 145
blurhash 5 84 5 84 50 145 50 145
erubi 5 138 5 149 50 137 50 154
etanni 5 100 5 80 50 72 50 47
fannkuchredux 5 55 5 54 50 100 50 99
fluentd 5 61 5 59 50 21 50 27
gcbench 5 10 5 10 50 10 50 16
graphql 5 371 5 471 50 569 50 974
graphql-native 5 57 5 89 50 22 50 60
knucleotide 5 163 5 144 50 117 50 98
lee 5 23 5 29 50 10 50 17
matmul 5 53 5 52 50 87 50 93
nbody 5 249 5 237 50 663 50 645
nqueens 5 119 5 127 50 554 50 571
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 181 50 698 50 808
protoboeuf-encode 5 200 5 193 50 802 50 757
rack 5 447 5 469 50 714 50 806
ruby-json 5 84 5 114 50 50 50 92
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 207 5 206 50 250 50 246
sudoku 5 48 5 49 50 155 50 158
tinygql 5 42 5 43 50 40 50 56
30k_ifelse 5 28 5 28 50 186 50 184
30k_methods 5 38 5 39 50 453 50 455
attr_accessor 5 157 5 182 50 1833 50 1890
cfunc_itself 5 348 5 313 50 1255 50 1258
fib 5 124 5 138 50 939 50 939
getivar 5 211 5 339 50 2313 50 2438
getivar-module 5 103 5 139 50 89 50 285
keyword_args 5 102 5 103 50 1240 50 1245
loops-times 5 23 5 26 50 64 50 62
object-new 5 268 5 474 50 297 50 1443
object-new-initialize 5 168 5 234 50 259 50 987
object-new-no-escape 5 80 5 138 50 89 50 498
respond_to 5 139 5 123 50 3896 50 3907
ruby-xor 5 246 5 233 50 1305 50 1311
send_bmethod 5 117 5 108 50 5539 50 4526
send_cfunc_block 5 107 5 104 50 307 50 305
send_rubyfunc_block 5 195 5 197 50 1372 50 1375
setivar 5 359 5 385 50 4930 50 4965
setivar_object 5 341 5 312 50 764 50 656
setivar_young 5 342 5 312 50 765 50 682
str_concat 5 391 5 429 50 1200 50 1047
structaref 5 154 5 191 50 1799 50 1878
structaset 5 198 5 179 50 369 50 486
throw 5 1108 5 1369 50 1442 50 1789

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) 1564803 1311172 203 2674 0 0% 0 0 74.168153
chunky-png (click) 315305 287568 79 1376 1 0% 0 0 38.129142
erubi-rails (click) 1389155 1218067 268 3626 23 0% 0 0 93.863316
hexapdf (click) 1534695 1272851 593 15767 44 0% 0 0 432.024728
liquid-c (click) 567735 455014 114 2240 5 0% 0 0 58.792275
liquid-compile (click) 482684 406768 146 2669 2 0% 0 0 73.250073
liquid-render (click) 674097 578408 131 2963 8 0% 0 0 77.530359
lobsters (click) 8565194 7149542 3123 63453 124 0% 0 0 2014.494366
mail (click) 875196 850048 345 7738 40 0% 0 0 208.555124
psych-load (click) 292707 277326 61 829 2 0% 0 0 23.69725
railsbench (click) 3362939 2816059 1592 19741 105 0% 0 0 533.198375
rubocop (click) 5809017 5059695 3002 57379 128 0% 6 0 1622.753257
ruby-lsp (click) 1051902 939998 409 7470 47 0% 1 0 197.824329
sequel (click) 511413 463486 11 119 0 0% 0 0 4.357698
shipit (click) 6901173 5917632 3134 50099 147 0% 0 0 1595.072638
addressable-equality (click) 325512 276569 44 1380 1 0% 0 0 33.179115
addressable-getters (click) 285844 235915 26 863 0 0% 0 0 20.219418
addressable-join (click) 291218 252600 24 941 0 0% 0 0 22.978021
addressable-merge (click) 291249 246966 27 896 0 0% 0 0 21.267003
addressable-new (click) 266080 211706 21 563 0 0% 0 0 13.524234
addressable-normalize (click) 320919 287990 43 1327 1 0% 0 0 31.659903
addressable-parse (click) 288561 237790 26 880 0 0% 0 0 21.059846
addressable-setters (click) 247311 232206 20 582 0 0% 0 0 13.905679
addressable-to-s (click) 284502 257789 26 849 0 0% 0 0 19.925753
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.764687
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.7639
erubi (click) 252242 241817 6 134 0 0% 0 0 3.839047
etanni (click) 32989 26478 8 114 0 0% 0 0 3.413093
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.722392
fluentd (click) 519223 455062 7 116 0 0% 0 0 3.617709
gcbench (click) 15640 8771 9 110 0 0% 0 0 3.388201
graphql (click) 418351 373967 74 1940 19 0% 0 0 52.554833
graphql-native (click) 360757 296932 39 532 0 0% 0 0 13.737901
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.77177
lee (click) 321440 313471 50 1102 0 0% 0 0 30.277114
matmul (click) 11103 4709 8 136 0 0% 0 0 4.081256
nbody (click) 14448 21176 6 251 0 0% 0 0 6.095278
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.160561
optcarrot (click) 321739 302768 188 4597 34 0% 0 0 106.118449
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.57754
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 43.05107
rack (click) 288557 239839 35 581 0 0% 0 0 14.363479
ruby-json (click) 19462 17420 8 206 0 0% 0 0 5.769533
rubyboy (click) 708577 641824 154 6871 42 0% 0 0 162.902724
rubykon (click) 147788 154811 138 2094 4 0% 0 0 54.706269
splay (click) 34617 22483 9 175 0 0% 0 0 5.202023
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.818474
tinygql (click) 304670 282971 59 1026 5 0% 0 0 26.363998
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1855.933403
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 472.497799
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.090102
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.493912
fib (click) 2659 2995 3 30 0 0% 0 0 1.109729
getivar (click) 3789 6778 3 79 0 0% 0 0 1.927752
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.323892
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.752711
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.982533
object-new (click) 2406 2818 2 36 0 0% 0 0 0.989162
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.288642
object-new-no-escape (click) 4295 4675 5 63 0 0% 0 0 1.750499
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.117688
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.77796
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.784591
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.29334
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.744326
setivar (click) 2783 3726 3 46 0 0% 0 0 1.249745
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.384741
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.683091
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.453862
structaref (click) 4407 9095 3 88 0 0% 0 0 2.318967
structaset (click) 4113 5834 3 70 0 0% 0 0 1.790234
throw (click) 5953 4624 5 53 0 0% 0 0 1.757678

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.