Ruby Benchmarks

Details for Benchmarks at 2026-05-24 01:21:52 UTC

YJIT metrics from the ruby-bench suite using Ruby 25dce37494.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 100.8% faster than CRuby 4.1.0dev
  • 11.5% faster than YJIT 3.4.7
On railsbench it is
  • 122.2% faster than CRuby 4.1.0dev
  • 17.4% 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 97 50 194 50 237
chunky-png 5 31 5 31 50 33 50 28
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 424 5 443 50 615 50 686
liquid-compile 5 420 5 517 50 585 50 868
liquid-render 5 170 5 175 50 411 50 466
lobsters 5 20 5 21 50 10 50 10
mail 5 193 5 210 50 254 50 309
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 155 50 245 50 257
ruby-lsp 5 158 5 162 50 239 50 229
sequel 5 414 5 460 50 578 50 654
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 29 50 12 50 18
addressable-getters 5 165 5 173 50 183 50 214
addressable-join 5 75 5 85 50 66 50 86
addressable-merge 5 160 5 160 50 223 50 248
addressable-new 5 351 5 346 50 521 50 544
addressable-normalize 5 52 5 58 50 60 50 71
addressable-parse 5 103 5 107 50 103 50 122
addressable-setters 5 185 5 188 50 233 50 261
addressable-to-s 5 163 5 169 50 182 50 212
binarytrees 5 82 5 83 50 136 50 149
blurhash 5 84 5 83 50 145 50 145
erubi 5 140 5 146 50 136 50 147
etanni 5 100 5 78 50 73 50 45
fannkuchredux 5 55 5 56 50 100 50 106
fluentd 5 59 5 61 50 20 50 27
gcbench 5 10 5 10 50 10 50 18
graphql 5 373 5 458 50 571 50 951
graphql-native 5 57 5 91 50 21 50 75
knucleotide 5 163 5 141 50 118 50 94
lee 5 23 5 31 50 10 50 19
matmul 5 53 5 51 50 87 50 97
nbody 5 250 5 238 50 663 50 655
nqueens 5 119 5 120 50 554 50 591
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 184 50 697 50 810
protoboeuf-encode 5 201 5 203 50 803 50 799
rack 5 439 5 474 50 709 50 815
ruby-json 5 84 5 115 50 50 50 95
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 11
splay 5 209 5 224 50 250 50 282
sudoku 5 48 5 49 50 155 50 169
tinygql 5 41 5 42 50 40 50 55
30k_ifelse 5 28 5 28 50 185 50 183
30k_methods 5 38 5 39 50 454 50 459
attr_accessor 5 157 5 173 50 1833 50 1878
cfunc_itself 5 348 5 312 50 1255 50 1258
fib 5 124 5 135 50 939 50 939
getivar 5 210 5 313 50 2280 50 2424
getivar-module 5 103 5 137 50 89 50 282
keyword_args 5 102 5 101 50 1240 50 1243
loops-times 5 23 5 25 50 63 50 62
object-new 5 268 5 476 50 297 50 1502
object-new-initialize 5 169 5 232 50 260 50 1029
object-new-no-escape 5 80 5 138 50 89 50 510
respond_to 5 139 5 120 50 3901 50 3893
ruby-xor 5 247 5 236 50 1305 50 1292
send_bmethod 5 118 5 116 50 5539 50 4526
send_cfunc_block 5 106 5 99 50 306 50 266
send_rubyfunc_block 5 196 5 194 50 1371 50 1375
setivar 5 359 5 366 50 4926 50 4945
setivar_object 5 341 5 291 50 762 50 647
setivar_young 5 341 5 292 50 806 50 680
str_concat 5 386 5 458 50 1201 50 1137
structaref 5 153 5 176 50 1798 50 1854
structaset 5 198 5 220 50 369 50 488
throw 5 1112 5 1345 50 1447 50 1826

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) 1566365 1312494 203 2668 0 0% 0 0 74.033439
chunky-png (click) 321602 286769 79 1376 1 0% 0 0 37.974884
erubi-rails (click) 1386892 1174129 268 3626 23 0% 0 0 94.576376
hexapdf (click) 1538047 1325866 593 15817 44 0% 0 0 430.559415
liquid-c (click) 567038 478132 114 2245 5 0% 0 0 59.168211
liquid-compile (click) 488223 420463 146 2746 2 0% 0 0 77.773425
liquid-render (click) 673061 584658 131 2963 8 0% 0 0 77.554796
lobsters (click) 8585694 7361707 3125 63680 122 0% 0 0 2058.310097
mail (click) 876862 859778 345 7738 40 0% 0 0 208.413292
psych-load (click) 293121 261283 61 833 2 0% 0 0 23.503378
railsbench (click) 3360057 2860636 1592 19763 105 0% 0 0 535.515831
rubocop (click) 5802117 4978590 3002 57337 128 0% 6 0 1648.788571
ruby-lsp (click) 1053512 908594 409 7472 47 0% 1 0 200.004394
sequel (click) 510900 429770 11 119 0 0% 0 0 4.261089
shipit (click) 7073170 6039077 3127 50159 147 0% 0 0 1603.804451
addressable-equality (click) 325500 284741 44 1380 1 0% 0 0 33.279852
addressable-getters (click) 282064 239524 26 863 0 0% 0 0 20.178954
addressable-join (click) 291206 277176 24 941 0 0% 0 0 23.247775
addressable-merge (click) 291237 287926 27 896 0 0% 0 0 21.5526
addressable-new (click) 262532 223736 21 569 0 0% 0 0 13.689515
addressable-normalize (click) 320907 312566 43 1327 1 0% 0 0 31.800131
addressable-parse (click) 284776 225010 26 880 0 0% 0 0 20.789771
addressable-setters (click) 262197 209083 20 582 0 0% 0 0 14.024997
addressable-to-s (click) 281672 246670 26 849 0 0% 0 0 19.795278
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.770003
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.834537
erubi (click) 252223 233645 6 134 0 0% 0 0 3.845546
etanni (click) 32989 26478 8 114 0 0% 0 0 3.40608
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.788789
fluentd (click) 493053 440749 7 116 0 0% 0 0 3.640174
gcbench (click) 15808 8981 9 110 0 0% 0 0 3.382524
graphql (click) 417720 389361 73 1931 19 0% 0 0 52.468666
graphql-native (click) 361075 313982 39 532 0 0% 0 0 13.680851
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.72442
lee (click) 321476 289313 49 1093 0 0% 0 0 30.191674
matmul (click) 11103 4709 8 136 0 0% 0 0 4.073058
nbody (click) 14448 21176 6 251 0 0% 0 0 6.05246
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.199403
optcarrot (click) 321739 302768 188 4597 34 0% 0 0 106.21458
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 70.861166
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 42.915272
rack (click) 288310 247331 35 586 0 0% 0 0 14.740884
ruby-json (click) 19699 17751 8 206 0 0% 0 0 5.765319
rubyboy (click) 708793 625617 154 6873 42 0% 0 0 162.5873
rubykon (click) 147788 154811 138 2094 4 0% 0 0 54.524691
splay (click) 34953 22682 9 175 0 0% 0 0 5.32827
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.914122
tinygql (click) 304646 274779 59 1026 5 0% 0 0 26.443537
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1867.327178
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 473.185729
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.090305
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.478154
fib (click) 2659 2995 3 30 0 0% 0 0 1.106903
getivar (click) 3789 6778 3 79 0 0% 0 0 1.921739
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.32189
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.788204
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.926121
object-new (click) 2406 2818 2 36 0 0% 0 0 1.009432
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.281815
object-new-no-escape (click) 4540 5102 5 68 0 0% 0 0 1.968861
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.102526
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.825543
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.820416
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.270716
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.735414
setivar (click) 2783 3726 3 46 0 0% 0 0 1.261524
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.395585
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.711054
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.396524
structaref (click) 4407 9095 3 88 0 0% 0 0 2.336944
structaset (click) 4113 5834 3 70 0 0% 0 0 1.78576
throw (click) 5953 4624 5 53 0 0% 0 0 1.771859

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.