Ruby Benchmarks

Details for Benchmarks at 2026-04-24 01:06:26 UTC

YJIT metrics from the ruby-bench suite using Ruby 7e1039e191.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 100.3% faster than CRuby 4.1.0dev
  • 7.9% faster than YJIT 3.4.7
On railsbench it is
  • 121.2% faster than CRuby 4.1.0dev
  • 14.6% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 60 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 93 5 95 50 202 50 238
chunky-png 5 31 5 30 50 34 50 27
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 425 5 432 50 623 50 658
liquid-compile 5 417 5 475 50 582 50 752
liquid-render 5 172 5 173 50 433 50 459
lobsters 5 20 5 20 50 10 50 10
mail 5 193 5 199 50 253 50 288
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 153 5 153 50 247 50 252
ruby-lsp 5 157 5 162 50 222 50 229
sequel 5 422 5 444 50 583 50 628
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 27 50 12 50 12
addressable-getters 5 164 5 165 50 184 50 193
addressable-join 5 74 5 79 50 65 50 72
addressable-merge 5 160 5 152 50 222 50 221
addressable-new 5 354 5 339 50 519 50 512
addressable-normalize 5 53 5 53 50 60 50 59
addressable-parse 5 104 5 102 50 104 50 110
addressable-setters 5 185 5 177 50 235 50 237
addressable-to-s 5 163 5 164 50 183 50 197
binarytrees 5 82 5 85 50 136 50 144
blurhash 5 84 5 84 50 145 50 145
erubi 5 128 5 147 50 139 50 151
etanni 5 100 5 77 50 73 50 45
fannkuchredux 5 55 5 57 50 100 50 105
fluentd 5 58 5 58 50 29 50 27
gcbench 5 10 5 10 50 10 50 15
graphql 5 373 5 435 50 567 50 942
graphql-native 5 58 5 89 50 21 50 73
knucleotide 5 163 5 145 50 118 50 98
lee 5 22 5 29 50 10 50 12
matmul 5 53 5 56 50 88 50 98
nbody 5 249 5 275 50 663 50 706
nqueens 5 119 5 121 50 554 50 578
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 173 5 180 50 698 50 788
protoboeuf-encode 5 201 5 192 50 808 50 833
rack 5 439 5 442 50 705 50 722
ruby-json 5 84 5 104 50 50 50 84
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 209 5 225 50 250 50 282
sudoku 5 48 5 49 50 155 50 158
tinygql 5 41 5 40 50 36 50 51
30k_ifelse 5 28 5 28 50 186 50 184
30k_methods 5 38 5 39 50 450 50 454
attr_accessor 5 157 5 177 50 1833 50 1883
cfunc_itself 5 348 5 326 50 1255 50 1259
fib 5 124 5 134 50 939 50 939
getivar 5 215 5 299 50 2305 50 2414
getivar-module 5 103 5 135 50 89 50 267
keyword_args 5 102 5 100 50 1240 50 1243
loops-times 5 23 5 25 50 63 50 62
object-new 5 267 5 467 50 295 50 1510
object-new-initialize 5 169 5 246 50 259 50 1020
object-new-no-escape 5 80 5 134 50 89 50 517
respond_to 5 139 5 131 50 3896 50 3903
ruby-xor 5 247 5 233 50 1305 50 1293
send_bmethod 5 118 5 116 50 5539 50 4526
send_cfunc_block 5 107 5 106 50 305 50 331
send_rubyfunc_block 5 196 5 203 50 1372 50 1376
setivar 5 359 5 479 50 4927 50 5043
setivar_object 5 341 5 345 50 762 50 653
setivar_young 5 341 5 346 50 808 50 692
str_concat 5 391 5 385 50 1201 50 1173
structaref 5 153 5 174 50 1800 50 1783
structaset 5 198 5 201 50 369 50 470
throw 5 1110 5 1404 50 1443 50 1892

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) 1558098 1319721 203 2723 0 0% 0 0 74.45681
chunky-png (click) 323854 305310 79 1376 1 0% 0 0 37.794476
erubi-rails (click) 1381000 1182329 268 3626 23 0% 0 0 99.939725
hexapdf (click) 1536898 1356323 593 15817 44 0% 0 0 428.51821
liquid-c (click) 567221 478423 114 2253 5 0% 0 0 59.95245
liquid-compile (click) 486755 451728 146 2736 2 0% 0 0 79.868366
liquid-render (click) 671036 614749 131 2963 8 0% 0 0 77.904829
lobsters (click) 8582775 7166091 3125 63736 122 0% 0 0 2065.105375
mail (click) 875107 881758 345 7738 40 0% 0 0 207.330573
psych-load (click) 291655 275289 61 833 2 0% 0 0 23.459143
railsbench (click) 3358510 2964132 1592 19775 104 0% 0 0 541.783306
rubocop (click) 5790780 4947448 3002 57204 127 0% 6 0 1640.170054
ruby-lsp (click) 1045991 890497 409 7472 47 0% 1 0 199.510065
sequel (click) 507813 459074 11 121 0 0% 0 0 4.349313
shipit (click) 7220921 6248930 3118 50265 148 0% 0 0 1599.67893
addressable-equality (click) 318513 293084 44 1389 1 0% 0 0 34.909661
addressable-getters (click) 282294 248492 26 869 0 0% 0 0 22.558673
addressable-join (click) 287506 240390 24 945 0 0% 0 0 25.235503
addressable-merge (click) 287494 259359 27 900 0 0% 0 0 23.724175
addressable-new (click) 261281 246907 21 569 0 0% 0 0 14.233637
addressable-normalize (click) 316840 291825 43 1327 1 0% 0 0 33.747015
addressable-parse (click) 285005 258554 26 886 0 0% 0 0 24.008293
addressable-setters (click) 262194 250590 20 582 0 0% 0 0 15.857123
addressable-to-s (click) 280128 244944 26 849 0 0% 0 0 21.271609
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.738237
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.918726
erubi (click) 250707 214835 6 134 0 0% 0 0 3.852323
etanni (click) 32989 26478 8 114 0 0% 0 0 3.390858
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.853524
fluentd (click) 487535 441671 7 116 0 0% 0 0 3.606565
gcbench (click) 15808 8981 9 110 0 0% 0 0 3.6011
graphql (click) 414863 369827 73 1931 19 0% 0 0 52.322178
graphql-native (click) 354199 289614 39 532 0 0% 0 0 13.599198
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.667837
lee (click) 321778 272972 49 1099 0 0% 0 0 30.087086
matmul (click) 11103 4709 8 136 0 0% 0 0 4.050805
nbody (click) 14448 21176 6 251 0 0% 0 0 6.087914
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.198748
optcarrot (click) 321739 302768 188 4597 34 0% 0 0 106.379603
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.935502
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 43.094189
rack (click) 288087 255149 35 586 0 0% 0 0 16.072378
ruby-json (click) 19699 17751 8 206 0 0% 0 0 5.709595
rubyboy (click) 704905 645535 154 6873 42 0% 0 0 161.904724
rubykon (click) 148777 155950 138 2107 4 0% 0 0 55.27791
splay (click) 34953 22682 9 175 0 0% 0 0 5.192725
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.849455
tinygql (click) 300890 294575 59 1032 5 0% 0 0 26.433297
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1862.50771
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 472.560893
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.085957
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.506462
fib (click) 2659 2995 3 30 0 0% 0 0 1.085287
getivar (click) 3789 6778 3 79 0 0% 0 0 1.947083
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.340705
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.800633
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.871531
object-new (click) 2406 2818 2 36 0 0% 0 0 0.992429
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.234789
object-new-no-escape (click) 4540 5102 5 68 0 0% 0 0 1.971318
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.141111
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.789935
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.796967
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.258338
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.754793
setivar (click) 2783 3726 3 46 0 0% 0 0 1.269943
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.402735
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.7213
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.420139
structaref (click) 4407 9095 3 88 0 0% 0 0 2.347335
structaset (click) 4113 5834 3 70 0 0% 0 0 1.781573
throw (click) 5953 4624 5 53 0 0% 0 0 1.764833

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.