Ruby Benchmarks

Details for Benchmarks at 2026-07-03 01:02:21 UTC

YJIT metrics from the ruby-bench suite using Ruby 354806506c.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 99.8% faster than CRuby 4.1.0dev
  • 10.3% faster than YJIT 3.4.7
On railsbench it is
  • 116.4% faster than CRuby 4.1.0dev
  • 17.2% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 1 minutes
aarch64 runtime: 7 hours, 50 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 92 5 96 50 201 50 238
chunky-png 5 32 5 30 50 27 50 27
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 421 5 441 50 618 50 677
liquid-compile 5 420 5 515 50 583 50 838
liquid-render 5 171 5 172 50 429 50 468
lobsters 5 20 5 21 50 10 50 10
mail 5 194 5 208 50 253 50 304
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 153 5 158 50 248 50 246
ruby-lsp 5 153 5 161 50 229 50 233
sequel 5 422 5 466 50 598 50 668
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 29 50 12 50 18
addressable-getters 5 165 5 172 50 184 50 210
addressable-join 5 75 5 84 50 65 50 81
addressable-merge 5 161 5 158 50 223 50 242
addressable-new 5 352 5 345 50 520 50 542
addressable-normalize 5 53 5 57 50 60 50 71
addressable-parse 5 104 5 106 50 103 50 118
addressable-setters 5 183 5 186 50 233 50 252
addressable-to-s 5 164 5 170 50 183 50 209
binarytrees 5 82 5 87 50 136 50 145
blurhash 5 83 5 84 50 145 50 145
erubi 5 136 5 149 50 140 50 152
etanni 5 100 5 79 50 73 50 47
fannkuchredux 5 55 5 57 50 100 50 103
fluentd 5 62 5 67 50 28 50 25
gcbench 5 10 5 10 50 10 50 16
graphql 5 369 5 464 50 564 50 953
graphql-native 5 58 5 90 50 22 50 55
knucleotide 5 163 5 143 50 117 50 97
lee 5 23 5 30 50 10 50 16
matmul 5 53 5 52 50 88 50 93
nbody 5 250 5 245 50 662 50 678
nqueens 5 112 5 128 50 555 50 574
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 174 5 184 50 698 50 777
protoboeuf-encode 5 198 5 199 50 802 50 795
rack 5 444 5 469 50 709 50 807
ruby-json 5 84 5 113 50 50 50 92
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 208 5 205 50 250 50 243
sudoku 5 48 5 50 50 155 50 158
tinygql 5 42 5 43 50 39 50 54
30k_ifelse 5 28 5 28 50 185 50 184
30k_methods 5 38 5 39 50 459 50 456
attr_accessor 5 157 5 174 50 1833 50 1878
cfunc_itself 5 348 5 312 50 1255 50 1258
fib 5 125 5 138 50 939 50 939
getivar 5 215 5 342 50 2314 50 2444
getivar-module 5 103 5 140 50 89 50 285
keyword_args 5 102 5 104 50 1239 50 1245
loops-times 5 23 5 26 50 63 50 61
object-new 5 268 5 471 50 297 50 1446
object-new-initialize 5 169 5 236 50 259 50 699
object-new-no-escape 5 80 5 134 50 89 50 502
respond_to 5 139 5 121 50 3903 50 3898
ruby-xor 5 247 5 235 50 1305 50 1311
send_bmethod 5 118 5 109 50 5539 50 4527
send_cfunc_block 5 106 5 103 50 305 50 294
send_rubyfunc_block 5 196 5 193 50 1371 50 1375
setivar 5 359 5 379 50 4929 50 4959
setivar_object 5 341 5 306 50 762 50 658
setivar_young 5 341 5 305 50 808 50 685
str_concat 5 390 5 426 50 1201 50 1036
structaref 5 153 5 175 50 1801 50 1853
structaset 5 152 5 217 50 370 50 486
throw 5 1108 5 1370 50 1437 50 1798

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) 1565351 1255880 204 2666 0 0% 0 0 74.771706
chunky-png (click) 325946 292438 79 1376 1 0% 0 0 38.110297
erubi-rails (click) 1387272 1258015 268 3626 23 0% 0 0 93.428177
hexapdf (click) 1535244 1290336 593 15767 44 0% 0 0 432.92117
liquid-c (click) 568228 497109 114 2240 5 0% 0 0 58.93285
liquid-compile (click) 483177 465267 146 2673 2 0% 0 0 73.133354
liquid-render (click) 659154 584670 131 2963 8 0% 0 0 77.369965
lobsters (click) 8552030 7042213 3124 63388 122 0% 0 0 2021.284001
mail (click) 876184 836050 345 7739 40 0% 0 0 208.473951
psych-load (click) 292535 237088 60 829 2 0% 0 0 23.406033
railsbench (click) 3360560 2889138 1592 19741 105 0% 0 0 535.58863
rubocop (click) 5806365 5034913 3001 57361 129 0% 6 0 1644.825974
ruby-lsp (click) 1053200 950047 409 7470 47 0% 1 0 198.926825
sequel (click) 511960 431787 11 119 0 0% 0 0 4.4192
shipit (click) 6875636 5866143 3137 50126 147 0% 0 0 1598.434615
addressable-equality (click) 326002 294011 44 1381 1 0% 0 0 33.226089
addressable-getters (click) 286285 253293 26 863 0 0% 0 0 20.30881
addressable-join (click) 291779 237302 24 941 0 0% 0 0 22.982967
addressable-merge (click) 291803 248047 27 896 0 0% 0 0 21.499444
addressable-new (click) 266639 229176 21 563 0 0% 0 0 13.586033
addressable-normalize (click) 321355 280787 43 1327 1 0% 0 0 31.734481
addressable-parse (click) 273198 227148 26 880 0 0% 0 0 20.766237
addressable-setters (click) 266829 247836 20 582 0 0% 0 0 14.120607
addressable-to-s (click) 282901 240138 26 849 0 0% 0 0 19.890607
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.773598
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.722113
erubi (click) 233825 203773 6 134 0 0% 0 0 4.038622
etanni (click) 32989 26478 8 114 0 0% 0 0 3.425685
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.978281
fluentd (click) 508070 434150 7 116 0 0% 0 0 3.60432
gcbench (click) 15640 8771 9 110 0 0% 0 0 3.362433
graphql (click) 418858 383211 74 1940 19 0% 0 0 52.327879
graphql-native (click) 362125 299651 39 532 0 0% 0 0 13.610771
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.716884
lee (click) 307502 280380 50 1102 0 0% 0 0 30.173634
matmul (click) 11103 4709 8 136 0 0% 0 0 4.092697
nbody (click) 14448 21176 6 251 0 0% 0 0 6.154639
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.246998
optcarrot (click) 321739 302768 188 4597 34 0% 0 0 106.159687
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.412856
protoboeuf-encode (click) 242245 233890 14 1820 0 0% 0 0 42.8896
rack (click) 273376 229372 35 581 0 0% 0 0 14.496734
ruby-json (click) 19699 17751 8 206 0 0% 0 0 5.685324
rubyboy (click) 709070 610109 154 6871 42 0% 0 0 162.998966
rubykon (click) 147788 154811 138 2094 4 0% 0 0 54.648816
splay (click) 34617 22483 9 175 0 0% 0 0 5.276499
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.820325
tinygql (click) 305123 267690 59 1026 5 0% 0 0 26.416238
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1860.476696
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 475.21484
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.106111
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.498124
fib (click) 2659 2995 3 30 0 0% 0 0 1.125009
getivar (click) 3789 6778 3 79 0 0% 0 0 1.90684
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.323672
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.778261
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.931263
object-new (click) 2406 2818 2 36 0 0% 0 0 0.992379
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.294939
object-new-no-escape (click) 4295 4675 5 63 0 0% 0 0 1.759802
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.129334
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.78927
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.819503
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.27924
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.765049
setivar (click) 2783 3726 3 46 0 0% 0 0 1.230177
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.398156
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.716745
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.466393
structaref (click) 4407 9095 3 88 0 0% 0 0 2.329491
structaset (click) 4113 5834 3 70 0 0% 0 0 1.777786
throw (click) 5953 4624 5 53 0 0% 0 0 1.725761

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.