Ruby Benchmarks

Details for Benchmarks at 2026-05-18 01:20:30 UTC

YJIT metrics from the ruby-bench suite using Ruby 3f51506cff.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 100.5% faster than CRuby 4.1.0dev
  • 11.3% faster than YJIT 3.4.7
On railsbench it is
  • 118.8% faster than CRuby 4.1.0dev
  • 15.4% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 2 minutes
aarch64 runtime: 7 hours, 51 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 97 50 192 50 240
chunky-png 5 32 5 31 50 34 50 28
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 423 5 447 50 617 50 687
liquid-compile 5 421 5 523 50 578 50 863
liquid-render 5 172 5 173 50 433 50 469
lobsters 5 20 5 21 50 10 50 10
mail 5 193 5 206 50 253 50 313
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 246 50 250
ruby-lsp 5 156 5 159 50 214 50 230
sequel 5 429 5 467 50 598 50 665
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 28 50 12 50 19
addressable-getters 5 165 5 174 50 183 50 216
addressable-join 5 74 5 85 50 66 50 85
addressable-merge 5 161 5 160 50 223 50 251
addressable-new 5 353 5 349 50 520 50 558
addressable-normalize 5 53 5 57 50 60 50 73
addressable-parse 5 104 5 108 50 105 50 124
addressable-setters 5 185 5 189 50 234 50 265
addressable-to-s 5 164 5 173 50 182 50 214
binarytrees 5 81 5 86 50 136 50 148
blurhash 5 84 5 83 50 145 50 145
erubi 5 141 5 147 50 135 50 152
etanni 5 100 5 80 50 72 50 47
fannkuchredux 5 55 5 56 50 100 50 108
fluentd 5 58 5 60 50 22 50 26
gcbench 5 10 5 10 50 10 50 17
graphql 5 361 5 466 50 568 50 982
graphql-native 5 58 5 85 50 21 50 73
knucleotide 5 163 5 143 50 117 50 96
lee 5 23 5 31 50 10 50 20
matmul 5 53 5 51 50 88 50 99
nbody 5 250 5 248 50 663 50 674
nqueens 5 119 5 123 50 554 50 591
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 174 50 697 50 823
protoboeuf-encode 5 201 5 197 50 800 50 787
rack 5 442 5 463 50 714 50 806
ruby-json 5 84 5 117 50 50 50 95
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 11
splay 5 208 5 221 50 250 50 279
sudoku 5 48 5 49 50 155 50 169
tinygql 5 41 5 43 50 40 50 55
30k_ifelse 5 28 5 28 50 185 50 185
30k_methods 5 38 5 39 50 456 50 455
attr_accessor 5 156 5 176 50 1832 50 1875
cfunc_itself 5 347 5 320 50 1255 50 1259
fib 5 125 5 135 50 939 50 939
getivar 5 215 5 319 50 2305 50 2426
getivar-module 5 103 5 104 50 89 50 280
keyword_args 5 102 5 103 50 1240 50 1243
loops-times 5 23 5 24 50 63 50 62
object-new 5 268 5 470 50 297 50 1514
object-new-initialize 5 169 5 232 50 260 50 1016
object-new-no-escape 5 80 5 138 50 89 50 519
respond_to 5 139 5 122 50 3904 50 3903
ruby-xor 5 246 5 232 50 1305 50 1299
send_bmethod 5 118 5 116 50 5539 50 4526
send_cfunc_block 5 106 5 106 50 305 50 291
send_rubyfunc_block 5 196 5 206 50 1372 50 1376
setivar 5 359 5 382 50 4930 50 4961
setivar_object 5 341 5 312 50 762 50 656
setivar_young 5 342 5 312 50 808 50 687
str_concat 5 391 5 450 50 1203 50 1170
structaref 5 153 5 174 50 1799 50 1849
structaset 5 197 5 226 50 370 50 478
throw 5 1109 5 1304 50 1442 50 1684

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) 1554644 1321827 203 2670 0 0% 0 0 73.282626
chunky-png (click) 322090 328064 79 1376 1 0% 0 0 38.032337
erubi-rails (click) 1386174 1189817 268 3626 23 0% 0 0 93.540685
hexapdf (click) 1532601 1326752 594 15790 44 0% 0 0 429.389664
liquid-c (click) 563325 465170 114 2240 5 0% 0 0 59.131598
liquid-compile (click) 485088 457927 146 2733 2 0% 0 0 77.71122
liquid-render (click) 669684 563968 131 2963 8 0% 0 0 78.98313
lobsters (click) 8595279 7315041 3125 63829 125 0% 0 0 2043.633542
mail (click) 876862 876162 345 7738 40 0% 0 0 208.988862
psych-load (click) 291086 234431 61 833 2 0% 0 0 23.868245
railsbench (click) 3362101 3043308 1592 19758 105 0% 0 0 535.629836
rubocop (click) 5796152 4945118 3002 57335 127 0% 6 0 1647.113997
ruby-lsp (click) 1053833 909068 409 7472 47 0% 1 0 199.064673
sequel (click) 507892 442316 11 119 0 0% 0 0 4.400336
shipit (click) 6879770 5769973 3134 50232 147 0% 0 0 1605.597451
addressable-equality (click) 322225 313276 44 1380 1 0% 0 0 33.341862
addressable-getters (click) 282562 239859 26 863 0 0% 0 0 20.22758
addressable-join (click) 288300 240494 24 945 0 0% 0 0 22.643265
addressable-merge (click) 287464 258762 27 896 0 0% 0 0 21.244453
addressable-new (click) 264561 234531 21 569 0 0% 0 0 13.91503
addressable-normalize (click) 312406 252008 43 1336 1 0% 0 0 31.938569
addressable-parse (click) 286512 260065 26 880 0 0% 0 0 21.260867
addressable-setters (click) 262988 242502 20 582 0 0% 0 0 13.940984
addressable-to-s (click) 283408 248957 26 849 0 0% 0 0 20.278005
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.762966
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.788611
erubi (click) 252223 233645 6 134 0 0% 0 0 3.834447
etanni (click) 32752 34339 8 114 0 0% 0 0 3.422508
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.778583
fluentd (click) 491057 421166 7 116 0 0% 0 0 3.612583
gcbench (click) 15808 8981 9 110 0 0% 0 0 3.329114
graphql (click) 414440 401532 73 1931 19 0% 0 0 52.397791
graphql-native (click) 359043 344494 39 532 0 0% 0 0 13.444932
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.626674
lee (click) 321755 305925 49 1093 0 0% 0 0 30.010409
matmul (click) 11103 4709 8 136 0 0% 0 0 4.096157
nbody (click) 14448 21176 6 251 0 0% 0 0 6.143414
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.191783
optcarrot (click) 321739 302768 188 4597 34 0% 0 0 106.834606
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.623346
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 43.096211
rack (click) 285025 275898 35 586 0 0% 0 0 14.716422
ruby-json (click) 19699 17751 8 206 0 0% 0 0 5.698459
rubyboy (click) 705416 588563 154 6873 42 0% 0 0 163.167644
rubykon (click) 148777 155950 138 2107 4 0% 0 0 55.323283
splay (click) 34953 22682 9 175 0 0% 0 0 5.279724
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.897874
tinygql (click) 301895 287428 59 1032 5 0% 0 0 26.409174
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1861.059909
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 474.758896
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.088135
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.497119
fib (click) 2659 2995 3 30 0 0% 0 0 1.120751
getivar (click) 3789 6778 3 79 0 0% 0 0 1.932161
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.292174
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.791192
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.908383
object-new (click) 2406 2818 2 36 0 0% 0 0 0.972472
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.260852
object-new-no-escape (click) 4540 5102 5 68 0 0% 0 0 1.917162
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.149158
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.814215
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.803125
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.288299
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.740568
setivar (click) 2783 3726 3 46 0 0% 0 0 1.260771
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.398611
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.693592
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.430696
structaref (click) 4407 9095 3 88 0 0% 0 0 2.358222
structaset (click) 4113 5834 3 70 0 0% 0 0 1.807487
throw (click) 5953 4624 5 53 0 0% 0 0 1.721526

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.