Ruby Benchmarks

Details for Benchmarks at 2026-02-18 00:53:22 UTC

YJIT metrics from the ruby-bench suite using Ruby 282f57a2bc.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 95.2% faster than CRuby 4.1.0dev
  • 5.9% faster than YJIT 3.4.7
On railsbench it is
  • 120.8% faster than CRuby 4.1.0dev
  • 12.0% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 25 minutes
aarch64 runtime: 7 hours, 18 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 98 50 190 50 235
chunky-png 5 31 5 33 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 418 5 429 50 624 50 626
liquid-compile 5 415 5 475 50 583 50 735
liquid-render 5 170 5 178 50 433 50 445
lobsters 5 20 5 20 50 10 50 10
mail 5 193 5 191 50 252 50 273
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 155 5 159 50 248 50 253
ruby-lsp 5 164 5 165 50 240 50 234
sequel 5 416 5 435 50 603 50 614
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 27 50 11 50 12
addressable-getters 5 163 5 173 50 184 50 199
addressable-join 5 74 5 78 50 65 50 69
addressable-merge 5 160 5 158 50 221 50 221
addressable-new 5 351 5 356 50 522 50 529
addressable-normalize 5 53 5 53 50 59 50 59
addressable-parse 5 103 5 105 50 104 50 110
addressable-setters 5 183 5 184 50 230 50 232
addressable-to-s 5 163 5 170 50 183 50 195
binarytrees 5 82 5 87 50 136 50 148
blurhash 5 83 5 86 50 143 50 145
erubi 5 137 5 150 50 124 50 153
etanni 5 99 5 74 50 72 50 40
fannkuchredux 5 55 5 57 50 102 50 106
fluentd 5 56 5 65 50 22 50 34
graphql 5 372 5 469 50 573 50 925
graphql-native 5 58 5 87 50 22 50 62
knucleotide 5 163 5 160 50 118 50 114
lee 5 23 5 23 50 10 50 10
matmul 5 51 5 56 50 94 50 97
nbody 5 246 5 290 50 679 50 704
nqueens 5 116 5 128 50 556 50 594
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 188 50 707 50 770
protoboeuf-encode 5 197 5 210 50 830 50 795
rack 5 439 5 464 50 707 50 720
ruby-json 5 81 5 101 50 47 50 75
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
sudoku 5 48 5 49 50 157 50 167
tinygql 5 41 5 44 50 40 50 51
30k_ifelse 5 28 5 28 50 185 50 183
30k_methods 5 38 5 41 50 456 50 455
attr_accessor 5 157 5 204 50 1834 50 1929
cfunc_itself 5 348 5 370 50 1255 50 1259
fib 5 124 5 143 50 938 50 939
getivar 5 217 5 331 50 2315 50 2429
getivar-module 5 104 5 140 50 90 50 270
keyword_args 5 100 5 102 50 1240 50 1242
loops-times 5 23 5 27 50 63 50 61
object-new 5 268 5 415 50 299 50 918
respond_to 5 139 5 140 50 3892 50 3901
ruby-xor 5 237 5 257 50 1314 50 1287
send_bmethod 5 117 5 125 50 5539 50 4527
send_cfunc_block 5 106 5 106 50 353 50 379
send_rubyfunc_block 5 250 5 253 50 6923 50 6925
setivar 5 359 5 481 50 4924 50 5045
setivar_object 5 341 5 302 50 753 50 550
setivar_young 5 341 5 302 50 801 50 566
str_concat 5 390 5 460 50 1197 50 1201
structaref 5 156 5 196 50 1812 50 1878
structaset 5 203 5 254 50 397 50 497
throw 5 1087 5 1432 50 1418 50 1911

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) 1553304 1350369 203 2653 0 0% 0 0 75.296238
chunky-png (click) 320545 302698 79 1376 1 0% 0 0 38.354673
erubi-rails (click) 1373664 1169696 268 3660 22 0% 0 0 98.844907
hexapdf (click) 1526161 1264749 594 15715 44 0% 0 0 437.868837
liquid-c (click) 560299 490422 114 2236 5 0% 0 0 60.136795
liquid-compile (click) 480418 422936 146 2704 2 0% 0 0 79.105787
liquid-render (click) 665649 563271 131 2959 8 0% 0 0 79.268822
lobsters (click) 8682472 7397360 3124 63990 119 0% 0 0 2112.350891
mail (click) 870902 878425 345 7728 40 0% 0 0 212.732836
psych-load (click) 288728 257439 61 831 2 0% 0 0 23.751973
railsbench (click) 3353712 2951816 1592 19725 97 0% 0 0 547.300786
rubocop (click) 5787829 5078663 3002 57184 125 0% 6 0 1657.536592
ruby-lsp (click) 1044773 872830 408 7446 46 0% 1 0 204.051287
sequel (click) 503731 447465 11 119 0 0% 0 0 3.875469
shipit (click) 7265590 6256775 3381 53732 168 0% 1 0 1750.58665
addressable-equality (click) 317387 252349 44 1380 1 0% 0 0 34.407854
addressable-getters (click) 276838 251111 26 863 0 0% 0 0 20.636066
addressable-join (click) 282997 220069 24 941 0 0% 0 0 23.434181
addressable-merge (click) 283124 247322 27 896 0 0% 0 0 21.893777
addressable-new (click) 258384 196104 21 569 0 0% 0 0 14.296464
addressable-normalize (click) 312989 272013 43 1329 1 0% 0 0 32.698265
addressable-parse (click) 279550 236597 26 880 0 0% 0 0 21.573721
addressable-setters (click) 258215 198051 20 584 0 0% 0 0 14.657909
addressable-to-s (click) 277231 202338 26 849 0 0% 0 0 20.533026
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.784114
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.195737
erubi (click) 248343 230801 6 134 0 0% 0 0 3.837495
etanni (click) 33355 27108 8 114 0 0% 0 0 3.446976
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.019203
fluentd (click) 488343 403803 7 116 0 0% 0 0 3.702746
graphql (click) 410262 366530 73 1909 19 0% 0 0 53.600091
graphql-native (click) 354779 300404 39 532 0 0% 0 0 14.032686
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.882054
lee (click) 318016 245251 49 1099 0 0% 0 0 31.045086
matmul (click) 11103 4709 8 136 0 0% 0 0 4.160002
nbody (click) 14448 21176 6 251 0 0% 0 0 6.097757
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.305838
optcarrot (click) 319416 277986 188 4589 34 0% 0 0 108.31205
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 72.42865
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 44.068006
rack (click) 283854 251660 35 581 0 0% 0 0 15.089346
ruby-json (click) 20323 18532 8 206 0 0% 0 0 5.66027
rubyboy (click) 705200 622818 154 6873 42 0% 0 0 166.618576
rubykon (click) 149667 148880 138 2117 4 0% 0 0 56.912998
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.961959
tinygql (click) 301108 288112 59 1031 5 0% 0 0 27.390203
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1945.29168
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 488.502795
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.091878
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.50854
fib (click) 2659 2995 3 30 0 0% 0 0 1.097554
getivar (click) 3789 6778 3 79 0 0% 0 0 1.922947
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.416919
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.803027
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.892887
object-new (click) 2406 2818 2 36 0 0% 0 0 1.137763
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.107131
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.788542
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.79526
send_cfunc_block (click) 13777 10257 5 192 0 0% 0 0 3.742125
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.429958
setivar (click) 2783 3726 3 46 0 0% 0 0 1.238414
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.425224
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.747183
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.452229
structaref (click) 4407 9095 3 88 0 0% 0 0 2.34452
structaset (click) 4113 5834 3 70 0 0% 0 0 1.753024
throw (click) 5953 4624 5 53 0 0% 0 0 1.844092

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.