Ruby Benchmarks

Details for Benchmarks at 2026-06-07 01:27:21 UTC

YJIT metrics from the ruby-bench suite using Ruby 2d9827db8b.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 102.2% faster than CRuby 4.1.0dev
  • 10.8% faster than YJIT 3.4.7
On railsbench it is
  • 120.7% faster than CRuby 4.1.0dev
  • 16.5% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 2 minutes
aarch64 runtime: 7 hours, 52 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 92 50 196 50 244
chunky-png 5 32 5 30 50 33 50 26
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 425 5 444 50 616 50 684
liquid-compile 5 419 5 522 50 581 50 870
liquid-render 5 171 5 176 50 434 50 471
lobsters 5 20 5 21 50 10 50 10
mail 5 194 5 210 50 254 50 312
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 155 5 155 50 249 50 255
ruby-lsp 5 154 5 161 50 240 50 237
sequel 5 428 5 463 50 599 50 663
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 29 50 12 50 19
addressable-getters 5 165 5 172 50 184 50 216
addressable-join 5 75 5 85 50 66 50 85
addressable-merge 5 161 5 161 50 223 50 252
addressable-new 5 354 5 350 50 523 50 557
addressable-normalize 5 52 5 57 50 60 50 72
addressable-parse 5 104 5 107 50 104 50 125
addressable-setters 5 184 5 186 50 233 50 260
addressable-to-s 5 164 5 173 50 182 50 214
binarytrees 5 82 5 83 50 136 50 150
blurhash 5 84 5 84 50 145 50 145
erubi 5 130 5 144 50 135 50 147
etanni 5 100 5 78 50 72 50 44
fannkuchredux 5 55 5 57 50 100 50 107
fluentd 5 61 5 65 50 24 50 25
gcbench 5 10 5 10 50 10 50 18
graphql 5 375 5 467 50 534 50 976
graphql-native 5 57 5 91 50 21 50 59
knucleotide 5 163 5 148 50 117 50 101
lee 5 23 5 30 50 10 50 18
matmul 5 53 5 51 50 88 50 98
nbody 5 250 5 248 50 662 50 643
nqueens 5 119 5 123 50 554 50 591
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 185 50 697 50 816
protoboeuf-encode 5 201 5 196 50 797 50 817
rack 5 445 5 453 50 706 50 806
ruby-json 5 84 5 116 50 51 50 95
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 11
splay 5 209 5 221 50 250 50 274
sudoku 5 48 5 49 50 155 50 168
tinygql 5 41 5 43 50 35 50 57
30k_ifelse 5 28 5 28 50 187 50 184
30k_methods 5 38 5 39 50 457 50 457
attr_accessor 5 156 5 183 50 1832 50 1894
cfunc_itself 5 348 5 314 50 1255 50 1258
fib 5 125 5 133 50 939 50 939
getivar 5 215 5 305 50 2278 50 2416
getivar-module 5 103 5 135 50 88 50 283
keyword_args 5 102 5 100 50 1240 50 1242
loops-times 5 23 5 25 50 63 50 62
object-new 5 268 5 460 50 297 50 1529
object-new-initialize 5 169 5 235 50 259 50 1026
object-new-no-escape 5 80 5 138 50 89 50 522
respond_to 5 139 5 124 50 3897 50 3903
ruby-xor 5 247 5 225 50 1305 50 1306
send_bmethod 5 118 5 115 50 5539 50 4526
send_cfunc_block 5 106 5 102 50 305 50 285
send_rubyfunc_block 5 196 5 199 50 1371 50 1375
setivar 5 359 5 404 50 4930 50 4983
setivar_object 5 341 5 304 50 759 50 595
setivar_young 5 341 5 307 50 809 50 611
str_concat 5 389 5 433 50 1201 50 1101
structaref 5 153 5 188 50 1799 50 1876
structaset 5 198 5 225 50 368 50 478
throw 5 1108 5 1358 50 1441 50 1699

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) 1563274 1366287 203 2664 0 0% 0 0 78.619766
chunky-png (click) 325387 274948 79 1376 1 0% 0 0 37.876518
erubi-rails (click) 1382279 1127208 268 3626 23 0% 0 0 95.011375
hexapdf (click) 1534079 1329225 593 15767 44 0% 0 0 425.016627
liquid-c (click) 566617 526742 114 2240 5 0% 0 0 58.353512
liquid-compile (click) 481571 388389 146 2669 2 0% 0 0 72.898941
liquid-render (click) 672979 551832 131 2963 8 0% 0 0 77.11357
lobsters (click) 8568261 7230370 3122 63543 122 0% 0 0 2108.018733
mail (click) 875701 850034 345 7738 40 0% 0 0 207.950157
psych-load (click) 288637 256043 61 829 2 0% 0 0 23.210803
railsbench (click) 3357062 2766568 1592 19742 105 0% 0 0 537.329339
rubocop (click) 5805064 5056120 3002 57355 127 0% 6 0 1623.091584
ruby-lsp (click) 1051880 898111 409 7470 47 0% 1 0 198.224161
sequel (click) 510796 413332 11 119 0 0% 0 0 4.189704
shipit (click) 7077797 5996548 3123 49942 147 0% 0 0 1573.496151
addressable-equality (click) 325512 276569 44 1380 1 0% 0 0 33.150632
addressable-getters (click) 285844 235915 26 863 0 0% 0 0 20.364472
addressable-join (click) 290268 259136 24 941 0 0% 0 0 22.470762
addressable-merge (click) 272285 248801 27 896 0 0% 0 0 21.068533
addressable-new (click) 266080 211706 21 563 0 0% 0 0 13.591051
addressable-normalize (click) 320919 287990 43 1327 1 0% 0 0 31.557814
addressable-parse (click) 284788 208626 26 880 0 0% 0 0 20.71332
addressable-setters (click) 266275 213987 20 582 0 0% 0 0 14.015032
addressable-to-s (click) 284502 257789 26 849 0 0% 0 0 19.863867
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.745973
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.827392
erubi (click) 248467 196294 6 134 0 0% 0 0 3.809587
etanni (click) 32752 34339 8 114 0 0% 0 0 3.432649
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.818337
fluentd (click) 515304 441969 7 116 0 0% 0 0 3.603073
gcbench (click) 15640 8771 9 110 0 0% 0 0 3.366396
graphql (click) 417737 372977 73 1931 19 0% 0 0 52.75523
graphql-native (click) 360999 322065 39 532 0 0% 0 0 13.64172
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.70778
lee (click) 317701 260081 49 1093 0 0% 0 0 30.017365
matmul (click) 11103 4709 8 136 0 0% 0 0 4.105688
nbody (click) 14448 21176 6 251 0 0% 0 0 6.119136
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.217296
optcarrot (click) 321739 302768 188 4597 34 0% 0 0 106.533282
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.548003
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 42.821556
rack (click) 287943 247093 35 581 0 0% 0 0 14.393335
ruby-json (click) 19699 17751 8 206 0 0% 0 0 5.720373
rubyboy (click) 707566 648372 154 6871 42 0% 0 0 162.91558
rubykon (click) 147788 154811 138 2094 4 0% 0 0 54.618027
splay (click) 34617 22483 9 175 0 0% 0 0 5.193662
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.843116
tinygql (click) 303713 256739 59 1026 5 0% 0 0 26.025745
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1860.689117
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 473.67114
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.126084
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.475486
fib (click) 2659 2995 3 30 0 0% 0 0 1.075899
getivar (click) 3789 6778 3 79 0 0% 0 0 1.941302
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.319515
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.787896
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.955417
object-new (click) 2406 2818 2 36 0 0% 0 0 1.009824
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.26034
object-new-no-escape (click) 4295 4675 5 63 0 0% 0 0 1.77273
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.109496
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.767348
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.801401
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.298704
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.729427
setivar (click) 2783 3726 3 46 0 0% 0 0 1.235507
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.412455
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.68432
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.414636
structaref (click) 4407 9095 3 88 0 0% 0 0 2.32983
structaset (click) 4113 5834 3 70 0 0% 0 0 1.769628
throw (click) 5953 4624 5 53 0 0% 0 0 1.761529

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.