Ruby Benchmarks

Details for Benchmarks at 2026-02-15 00:56:03 UTC

YJIT metrics from the ruby-bench suite using Ruby 2065b55980.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 92.0% faster than CRuby 4.1.0dev
  • 6.5% faster than YJIT 3.4.7
On railsbench it is
  • 112.5% faster than CRuby 4.1.0dev
  • 11.7% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 16 minutes
aarch64 runtime: 7 hours, 11 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 90 5 100 50 199 50 238
chunky-png 5 31 5 32 50 33 50 27
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 421 5 435 50 624 50 645
liquid-compile 5 403 5 470 50 583 50 734
liquid-render 5 174 5 176 50 437 50 449
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 199 50 252 50 275
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 159 50 247 50 253
ruby-lsp 5 160 5 165 50 215 50 234
sequel 5 426 5 434 50 589 50 604
addressable-equality 5 27 5 27 50 11 50 11
addressable-getters 5 165 5 171 50 183 50 198
addressable-join 5 74 5 77 50 65 50 71
addressable-merge 5 159 5 160 50 221 50 222
addressable-new 5 355 5 359 50 526 50 532
addressable-normalize 5 54 5 54 50 59 50 60
addressable-parse 5 103 5 106 50 104 50 110
addressable-setters 5 183 5 188 50 227 50 234
addressable-to-s 5 165 5 172 50 183 50 197
binarytrees 5 82 5 87 50 136 50 147
blurhash 5 83 5 86 50 143 50 144
erubi 5 137 5 142 50 134 50 148
etanni 5 97 5 72 50 71 50 39
fannkuchredux 5 55 5 57 50 102 50 103
fluentd 5 56 5 61 50 20 50 33
graphql 5 358 5 470 50 570 50 948
graphql-native 5 59 5 89 50 22 50 70
knucleotide 5 163 5 157 50 118 50 112
lee 5 23 5 24 50 10 50 10
matmul 5 51 5 56 50 95 50 96
nbody 5 246 5 297 50 679 50 703
nqueens 5 116 5 126 50 556 50 579
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 186 50 707 50 761
protoboeuf-encode 5 197 5 205 50 834 50 822
rack 5 434 5 454 50 711 50 715
ruby-json 5 82 5 101 50 47 50 72
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
sudoku 5 48 5 48 50 157 50 158
tinygql 5 40 5 43 50 40 50 49
30k_ifelse 5 28 5 28 50 186 50 183
30k_methods 5 38 5 40 50 456 50 456
attr_accessor 5 157 5 194 50 1834 50 1919
cfunc_itself 5 348 5 361 50 1255 50 1259
fib 5 123 5 144 50 940 50 939
getivar 5 216 5 310 50 2313 50 2419
getivar-module 5 104 5 132 50 90 50 266
keyword_args 5 100 5 109 50 1240 50 1243
loops-times 5 23 5 26 50 64 50 62
object-new 5 268 5 414 50 298 50 922
respond_to 5 139 5 141 50 3894 50 3907
ruby-xor 5 236 5 246 50 1313 50 1287
send_bmethod 5 116 5 125 50 5539 50 4527
send_cfunc_block 5 107 5 107 50 353 50 383
send_rubyfunc_block 5 251 5 253 50 6926 50 6928
setivar 5 359 5 481 50 4922 50 5044
setivar_object 5 341 5 304 50 749 50 550
setivar_young 5 341 5 307 50 799 50 569
str_concat 5 391 5 467 50 1201 50 1178
structaref 5 156 5 196 50 1809 50 1897
structaset 5 204 5 180 50 397 50 494
throw 5 1087 5 1384 50 1410 50 1817

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) 1553278 1350459 203 2655 0 0% 0 0 75.763511
chunky-png (click) 321430 287858 79 1376 1 0% 0 0 39.013413
erubi-rails (click) 1383405 1231009 269 3674 22 0% 0 0 97.176492
hexapdf (click) 1528258 1283415 594 15742 44 0% 0 0 440.168688
liquid-c (click) 557507 503241 114 2236 5 0% 0 0 58.485557
liquid-compile (click) 481622 424666 146 2718 2 0% 0 0 79.109181
liquid-render (click) 665818 563816 131 2959 8 0% 0 0 78.812253
lobsters (click) 8706257 7299162 3124 64247 117 0% 0 0 2097.58597
mail (click) 872096 773695 345 7728 40 0% 0 0 213.126174
psych-load (click) 279446 246544 61 831 2 0% 0 0 23.922963
railsbench (click) 3351888 2793865 1592 19744 97 0% 0 0 549.158101
rubocop (click) 5783993 4958415 3002 57138 125 0% 6 0 1658.152013
ruby-lsp (click) 1043002 962800 409 7472 47 0% 1 0 204.764415
sequel (click) 502578 421105 11 119 0 0% 0 0 4.033304
addressable-equality (click) 320243 263895 44 1424 1 0% 0 0 35.42602
addressable-getters (click) 277719 236271 26 863 0 0% 0 0 20.614911
addressable-join (click) 282997 220069 24 941 0 0% 0 0 23.322282
addressable-merge (click) 283680 247291 27 896 0 0% 0 0 22.036275
addressable-new (click) 257960 228451 21 563 0 0% 0 0 14.156184
addressable-normalize (click) 312859 263862 43 1329 1 0% 0 0 32.872563
addressable-parse (click) 280340 221643 26 880 0 0% 0 0 21.715199
addressable-setters (click) 258054 197840 20 582 0 0% 0 0 14.454267
addressable-to-s (click) 277231 210530 26 849 0 0% 0 0 20.525795
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.784512
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.154295
erubi (click) 248343 230801 6 134 0 0% 0 0 3.868018
etanni (click) 33355 27108 8 114 0 0% 0 0 3.417748
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.000662
fluentd (click) 487235 435506 7 116 0 0% 0 0 3.668671
graphql (click) 410409 350334 73 1909 19 0% 0 0 53.364989
graphql-native (click) 354784 300404 39 532 0 0% 0 0 13.956109
knucleotide (click) 9939 10477 7 110 0 0% 0 0 6.803643
lee (click) 318016 245251 49 1099 0 0% 0 0 31.037481
matmul (click) 11103 4709 8 136 0 0% 0 0 4.194562
nbody (click) 14448 21176 6 251 0 0% 0 0 6.163607
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.307962
optcarrot (click) 319416 277986 188 4589 34 0% 0 0 108.367884
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 72.763354
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 43.998491
rack (click) 283854 251660 35 581 0 0% 0 0 14.905527
ruby-json (click) 20323 18532 8 206 0 0% 0 0 5.753887
rubyboy (click) 705102 622729 154 6871 42 0% 0 0 167.156139
rubykon (click) 148777 155950 138 2107 4 0% 0 0 56.814676
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.998712
tinygql (click) 300579 287619 59 1025 5 0% 0 0 27.013302
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1942.087331
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 493.032723
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.096849
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.466471
fib (click) 2659 2995 3 30 0 0% 0 0 1.09781
getivar (click) 3789 6778 3 79 0 0% 0 0 1.911688
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.323506
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.812879
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.945195
object-new (click) 2406 2818 2 36 0 0% 0 0 1.139938
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.105341
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.81714
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.788445
send_cfunc_block (click) 13777 10257 5 192 0 0% 0 0 3.730361
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.440237
setivar (click) 2783 3726 3 46 0 0% 0 0 1.250604
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.371943
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.715259
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.395065
structaref (click) 4407 9095 3 88 0 0% 0 0 2.312558
structaset (click) 4113 5834 3 70 0 0% 0 0 1.758049
throw (click) 5953 4624 5 53 0 0% 0 0 1.847541

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.