Ruby Benchmarks

Details for Benchmarks at 2026-03-13 00:51:28 UTC

YJIT metrics from the ruby-bench suite using Ruby b0754fbd43.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 93.6% faster than CRuby 4.1.0dev
  • 6.5% faster than YJIT 3.4.7
On railsbench it is
  • 116.4% faster than CRuby 4.1.0dev
  • 14.6% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 6 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 90 5 100 50 188 50 235
chunky-png 5 31 5 33 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 422 5 436 50 623 50 652
liquid-compile 5 418 5 477 50 583 50 717
liquid-render 5 166 5 176 50 434 50 456
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 202 50 253 50 277
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 256
ruby-lsp 5 155 5 162 50 229 50 236
sequel 5 424 5 448 50 578 50 617
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 28 50 11 50 14
addressable-getters 5 164 5 173 50 183 50 202
addressable-join 5 73 5 80 50 66 50 76
addressable-merge 5 159 5 163 50 222 50 234
addressable-new 5 354 5 364 50 523 50 546
addressable-normalize 5 53 5 54 50 59 50 64
addressable-parse 5 104 5 108 50 104 50 115
addressable-setters 5 184 5 189 50 229 50 245
addressable-to-s 5 164 5 176 50 183 50 203
binarytrees 5 82 5 89 50 136 50 148
blurhash 5 83 5 87 50 143 50 145
erubi 5 138 5 152 50 134 50 153
etanni 5 99 5 75 50 72 50 41
fannkuchredux 5 55 5 57 50 102 50 103
fluentd 5 56 5 66 50 20 50 31
gcbench 5 10 5 10 50 10 50 10
graphql 5 368 5 478 50 570 50 956
graphql-native 5 58 5 89 50 23 50 65
knucleotide 5 163 5 159 50 118 50 114
lee 5 23 5 31 50 10 50 10
matmul 5 51 5 50 50 94 50 97
nbody 5 246 5 272 50 676 50 703
nqueens 5 116 5 126 50 556 50 579
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 184 50 707 50 781
protoboeuf-encode 5 197 5 203 50 832 50 776
rack 5 440 5 454 50 706 50 723
ruby-json 5 82 5 103 50 46 50 75
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 211 5 232 50 244 50 286
sudoku 5 48 5 49 50 157 50 158
tinygql 5 42 5 44 50 40 50 49
30k_ifelse 5 28 5 28 50 185 50 184
30k_methods 5 38 5 40 50 457 50 454
attr_accessor 5 157 5 208 50 1836 50 1935
cfunc_itself 5 348 5 358 50 1255 50 1259
fib 5 124 5 141 50 940 50 940
getivar 5 217 5 292 50 2316 50 2402
getivar-module 5 104 5 124 50 90 50 259
keyword_args 5 100 5 105 50 1240 50 1242
loops-times 5 23 5 24 50 64 50 60
object-new 5 268 5 412 50 296 50 917
object-new-initialize 5 169 5 247 50 259 50 747
object-new-no-escape 5 81 5 130 50 90 50 367
respond_to 5 139 5 139 50 3889 50 3901
ruby-xor 5 236 5 248 50 1313 50 1301
send_bmethod 5 117 5 122 50 5538 50 4527
send_cfunc_block 5 107 5 107 50 353 50 383
send_rubyfunc_block 5 250 5 249 50 6924 50 6917
setivar 5 359 5 443 50 4924 50 5017
setivar_object 5 341 5 294 50 714 50 539
setivar_young 5 341 5 297 50 800 50 561
str_concat 5 391 5 444 50 1201 50 1163
structaref 5 157 5 196 50 1806 50 1891
structaset 5 202 5 255 50 397 50 497
throw 5 1089 5 1372 50 1413 50 1788

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) 1553244 1301122 203 2651 0 0% 0 0 75.528717
chunky-png (click) 320454 286109 79 1376 1 0% 0 0 39.169506
erubi-rails (click) 1374498 1081040 268 3658 22 0% 0 0 98.201389
hexapdf (click) 1526491 1272538 594 15730 44 0% 0 0 440.224702
liquid-c (click) 557637 461720 114 2236 5 0% 0 0 60.108019
liquid-compile (click) 478802 387352 146 2696 2 0% 0 0 78.023801
liquid-render (click) 664915 561148 131 2959 8 0% 0 0 79.689681
lobsters (click) 8702355 7344277 3125 64226 120 0% 0 0 2109.573486
mail (click) 870922 853830 345 7728 40 0% 0 0 215.697662
psych-load (click) 287749 272074 61 831 2 0% 0 0 24.286988
railsbench (click) 3351482 2924480 1592 19751 97 0% 0 0 554.491319
rubocop (click) 5788758 5128621 3002 57191 125 0% 6 0 1668.593839
ruby-lsp (click) 1042280 945081 408 7446 46 0% 1 0 204.936433
sequel (click) 503186 454355 11 119 0 0% 0 0 3.920555
shipit (click) 7138225 5928193 3301 52342 168 0% 0 0 1725.672168
addressable-equality (click) 316402 275142 44 1380 1 0% 0 0 34.254381
addressable-getters (click) 276737 267261 26 863 0 0% 0 0 20.908471
addressable-join (click) 283248 220261 24 941 0 0% 0 0 23.957842
addressable-merge (click) 283279 239203 27 896 0 0% 0 0 22.240407
addressable-new (click) 256973 243052 21 563 0 0% 0 0 14.120963
addressable-normalize (click) 312493 262971 43 1336 1 0% 0 0 33.439167
addressable-parse (click) 279449 252747 26 880 0 0% 0 0 21.498385
addressable-setters (click) 257163 245328 20 582 0 0% 0 0 14.498124
addressable-to-s (click) 277482 227106 26 849 0 0% 0 0 20.646516
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.806718
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.332849
erubi (click) 248090 197175 6 134 0 0% 0 0 3.895549
etanni (click) 32951 34772 8 114 0 0% 0 0 3.480729
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.190935
fluentd (click) 486947 410557 7 116 0 0% 0 0 3.771145
gcbench (click) 15808 8981 9 110 0 0% 0 0 3.496841
graphql (click) 396653 325985 73 1909 18 0% 0 0 53.336953
graphql-native (click) 353904 289913 39 532 0 0% 0 0 14.28724
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.731032
lee (click) 310200 262561 49 1102 0 0% 0 0 31.681199
matmul (click) 11103 4709 8 136 0 0% 0 0 4.184294
nbody (click) 14448 21176 6 251 0 0% 0 0 6.19902
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.499682
optcarrot (click) 319416 277986 188 4589 34 0% 0 0 108.86794
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 74.496046
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 47.791063
rack (click) 284490 268535 35 586 0 0% 0 0 15.533335
ruby-json (click) 19917 18004 8 206 0 0% 0 0 5.705967
rubyboy (click) 705353 622911 154 6873 42 0% 0 0 168.326217
rubykon (click) 148777 155950 138 2107 4 0% 0 0 56.862461
splay (click) 34953 22682 9 175 0 0% 0 0 5.316118
sudoku (click) 51776 65830 7 871 0 0% 0 0 23.274366
tinygql (click) 301165 247086 59 1031 5 0% 0 0 27.354102
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1957.582633
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 495.185813
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.138942
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.488113
fib (click) 2659 2995 3 30 0 0% 0 0 1.119049
getivar (click) 3789 6778 3 79 0 0% 0 0 1.978047
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.379005
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.810856
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.940206
object-new (click) 2406 2818 2 36 0 0% 0 0 1.074709
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.303909
object-new-no-escape (click) 4540 5102 5 68 0 0% 0 0 1.977607
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.147909
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.838822
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 2.002189
send_cfunc_block (click) 13777 10257 5 192 0 0% 0 0 3.837378
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.458522
setivar (click) 2783 3726 3 46 0 0% 0 0 1.289929
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.460034
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.751782
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.459208
structaref (click) 4407 9095 3 88 0 0% 0 0 2.386655
structaset (click) 4113 5834 3 70 0 0% 0 0 1.832319
throw (click) 5953 4624 5 53 0 0% 0 0 1.803514

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.