Ruby Benchmarks

Details for Benchmarks at 2026-03-21 00:49:20 UTC

YJIT metrics from the ruby-bench suite using Ruby 4860f35018.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 95.3% faster than CRuby 4.1.0dev
  • 7.4% faster than YJIT 3.4.7
On railsbench it is
  • 112.1% faster than CRuby 4.1.0dev
  • 13.5% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 5 minutes
aarch64 runtime: 7 hours, 54 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 98 50 193 50 243
chunky-png 5 31 5 33 50 32 50 29
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 422 5 438 50 620 50 648
liquid-compile 5 419 5 486 50 583 50 738
liquid-render 5 170 5 176 50 433 50 451
lobsters 5 20 5 20 50 10 50 10
mail 5 193 5 193 50 252 50 290
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 161 50 247 50 254
ruby-lsp 5 164 5 162 50 240 50 233
sequel 5 426 5 439 50 588 50 625
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 28 50 11 50 14
addressable-getters 5 163 5 173 50 184 50 205
addressable-join 5 73 5 80 50 65 50 75
addressable-merge 5 160 5 161 50 220 50 227
addressable-new 5 353 5 358 50 523 50 527
addressable-normalize 5 53 5 56 50 59 50 63
addressable-parse 5 104 5 107 50 104 50 114
addressable-setters 5 183 5 189 50 230 50 240
addressable-to-s 5 163 5 172 50 182 50 201
binarytrees 5 82 5 88 50 136 50 158
blurhash 5 83 5 86 50 143 50 145
erubi 5 136 5 154 50 125 50 155
etanni 5 99 5 75 50 71 50 40
fannkuchredux 5 54 5 52 50 102 50 93
fluentd 5 56 5 67 50 29 50 35
gcbench 5 10 5 10 50 10 50 10
graphql 5 376 5 451 50 572 50 942
graphql-native 5 59 5 88 50 23 50 69
knucleotide 5 163 5 159 50 117 50 113
lee 5 23 5 30 50 10 50 10
matmul 5 51 5 53 50 94 50 96
nbody 5 244 5 247 50 677 50 670
nqueens 5 116 5 129 50 556 50 580
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 187 50 705 50 801
protoboeuf-encode 5 197 5 207 50 829 50 813
rack 5 441 5 460 50 707 50 731
ruby-json 5 81 5 103 50 46 50 78
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 23 50 10 50 10
splay 5 210 5 233 50 244 50 288
sudoku 5 48 5 48 50 157 50 158
tinygql 5 42 5 43 50 37 50 50
30k_ifelse 5 28 5 28 50 185 50 183
30k_methods 5 38 5 41 50 457 50 455
attr_accessor 5 157 5 180 50 1834 50 1884
cfunc_itself 5 349 5 318 50 1252 50 1259
fib 5 124 5 142 50 939 50 939
getivar 5 215 5 321 50 2317 50 2421
getivar-module 5 104 5 139 50 90 50 269
keyword_args 5 100 5 97 50 1239 50 1240
loops-times 5 23 5 27 50 64 50 62
object-new 5 268 5 407 50 298 50 900
object-new-initialize 5 169 5 247 50 257 50 764
object-new-no-escape 5 81 5 129 50 90 50 367
respond_to 5 139 5 140 50 3890 50 3900
ruby-xor 5 236 5 247 50 1314 50 1300
send_bmethod 5 116 5 121 50 5537 50 4527
send_cfunc_block 5 106 5 105 50 353 50 383
send_rubyfunc_block 5 251 5 255 50 6928 50 6928
setivar 5 360 5 486 50 4917 50 5040
setivar_object 5 341 5 303 50 750 50 630
setivar_young 5 341 5 305 50 800 50 661
str_concat 5 390 5 461 50 1199 50 1208
structaref 5 156 5 142 50 1810 50 1868
structaset 5 201 5 251 50 396 50 483
throw 5 1087 5 1441 50 1415 50 1900

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) 1554089 1349903 203 2655 0 0% 0 0 75.201111
chunky-png (click) 319635 261340 79 1376 1 0% 0 0 39.476114
erubi-rails (click) 1376007 1106260 269 3653 22 0% 0 0 97.58731
hexapdf (click) 1528798 1324148 594 15720 44 0% 0 0 438.303026
liquid-c (click) 559411 454924 114 2236 5 0% 0 0 60.152805
liquid-compile (click) 482337 423124 146 2703 2 0% 0 0 78.925963
liquid-render (click) 667479 555731 131 2959 8 0% 0 0 79.111079
lobsters (click) 8687280 7224271 3127 64015 122 0% 0 0 2117.285869
mail (click) 873627 840373 345 7728 40 0% 0 0 214.870982
psych-load (click) 288617 256241 61 831 2 0% 0 0 24.004836
railsbench (click) 3352686 2933188 1592 19689 93 0% 0 0 553.245703
rubocop (click) 5783037 5079352 3002 57106 125 0% 6 0 1673.572527
ruby-lsp (click) 1044117 905785 409 7464 47 0% 1 0 206.777586
sequel (click) 503934 397513 11 119 0 0% 0 0 3.919337
shipit (click) 7137684 6063126 3125 50537 143 0% 0 0 1658.184
addressable-equality (click) 314870 263266 44 1424 1 0% 0 0 35.336117
addressable-getters (click) 277407 259423 26 863 0 0% 0 0 21.091636
addressable-join (click) 284714 237597 24 941 0 0% 0 0 23.848532
addressable-merge (click) 284740 231958 27 896 0 0% 0 0 22.698304
addressable-new (click) 262476 240962 21 591 0 0% 0 0 14.911479
addressable-normalize (click) 316335 273564 43 1327 1 0% 0 0 32.841123
addressable-parse (click) 274554 212456 26 880 0 0% 0 0 21.565196
addressable-setters (click) 259766 223555 20 582 0 0% 0 0 14.502307
addressable-to-s (click) 282310 230133 26 849 0 0% 0 0 20.767055
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.861037
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.13438
erubi (click) 248407 196309 6 134 0 0% 0 0 3.956815
etanni (click) 32731 34499 8 114 0 0% 0 0 3.464939
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.029511
fluentd (click) 488060 402231 7 116 0 0% 0 0 3.721409
gcbench (click) 15808 8981 9 110 0 0% 0 0 3.446926
graphql (click) 409717 339549 73 1909 19 0% 0 0 53.861405
graphql-native (click) 356699 268406 39 532 0 0% 0 0 14.058454
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.791852
lee (click) 321138 288879 49 1099 0 0% 0 0 31.607245
matmul (click) 11103 4709 8 136 0 0% 0 0 4.227228
nbody (click) 14448 21176 6 251 0 0% 0 0 6.265044
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.436421
optcarrot (click) 319416 277986 188 4589 34 0% 0 0 109.146259
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 74.529878
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 44.463668
rack (click) 288131 248732 35 628 0 0% 0 0 16.53069
ruby-json (click) 19699 17751 8 206 0 0% 0 0 5.9
rubyboy (click) 706433 622863 154 6871 42 0% 0 0 169.914356
rubykon (click) 149667 148880 138 2117 4 0% 0 0 56.80358
splay (click) 34953 22682 9 175 0 0% 0 0 5.387148
sudoku (click) 51776 65830 7 871 0 0% 0 0 23.320868
tinygql (click) 302725 256364 59 1031 5 0% 0 0 27.490631
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1975.664631
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 493.605278
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.12365
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.55262
fib (click) 2659 2995 3 30 0 0% 0 0 1.13847
getivar (click) 3789 6778 3 79 0 0% 0 0 1.990738
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.404999
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.876304
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.938247
object-new (click) 2406 2818 2 36 0 0% 0 0 1.115527
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.355888
object-new-no-escape (click) 4540 5102 5 68 0 0% 0 0 2.003477
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.20229
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.891662
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.837648
send_cfunc_block (click) 13777 10257 5 192 0 0% 0 0 3.805491
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.477421
setivar (click) 2783 3726 3 46 0 0% 0 0 1.270952
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.44804
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.771155
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.453881
structaref (click) 4407 9095 3 88 0 0% 0 0 2.375855
structaset (click) 4113 5834 3 70 0 0% 0 0 1.82222
throw (click) 5953 4624 5 53 0 0% 0 0 1.811455

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.