Ruby Benchmarks

Details for Benchmarks at 2026-03-02 00:52:23 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 95.3% faster than CRuby 4.1.0dev
  • 5.9% faster than YJIT 3.4.7
On railsbench it is
  • 112.1% faster than CRuby 4.1.0dev
  • 12.7% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 23 minutes
aarch64 runtime: 7 hours, 16 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 199 50 244
chunky-png 5 31 5 32 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 420 5 433 50 624 50 649
liquid-compile 5 419 5 488 50 584 50 739
liquid-render 5 172 5 173 50 433 50 444
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 196 50 252 50 276
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 257
ruby-lsp 5 157 5 164 50 228 50 229
sequel 5 424 5 437 50 599 50 637
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 204
addressable-join 5 73 5 82 50 65 50 76
addressable-merge 5 160 5 164 50 220 50 228
addressable-new 5 354 5 360 50 522 50 537
addressable-normalize 5 54 5 56 50 59 50 64
addressable-parse 5 103 5 108 50 104 50 114
addressable-setters 5 183 5 190 50 230 50 241
addressable-to-s 5 162 5 176 50 182 50 202
binarytrees 5 82 5 87 50 136 50 148
blurhash 5 83 5 87 50 143 50 144
erubi 5 128 5 148 50 140 50 151
etanni 5 97 5 72 50 71 50 38
fannkuchredux 5 55 5 57 50 102 50 104
fluentd 5 56 5 61 50 20 50 31
graphql 5 374 5 469 50 570 50 974
graphql-native 5 58 5 89 50 22 50 70
knucleotide 5 163 5 162 50 118 50 116
lee 5 23 5 24 50 10 50 10
matmul 5 51 5 49 50 94 50 96
nbody 5 246 5 274 50 676 50 700
nqueens 5 116 5 129 50 556 50 595
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 173 5 175 50 707 50 757
protoboeuf-encode 5 197 5 204 50 835 50 814
rack 5 441 5 466 50 710 50 730
ruby-json 5 81 5 103 50 50 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 156 50 168
tinygql 5 42 5 44 50 35 50 50
30k_ifelse 5 28 5 28 50 185 50 184
30k_methods 5 38 5 41 50 456 50 450
attr_accessor 5 157 5 196 50 1836 50 1918
cfunc_itself 5 348 5 350 50 1255 50 1259
fib 5 124 5 144 50 939 50 939
getivar 5 217 5 294 50 2315 50 2405
getivar-module 5 103 5 124 50 90 50 259
keyword_args 5 100 5 99 50 1240 50 1243
loops-times 5 23 5 24 50 64 50 62
object-new 5 268 5 412 50 295 50 916
respond_to 5 139 5 138 50 3889 50 3904
ruby-xor 5 236 5 223 50 1313 50 1298
send_bmethod 5 117 5 124 50 5538 50 4527
send_cfunc_block 5 107 5 106 50 353 50 384
send_rubyfunc_block 5 251 5 249 50 6924 50 6920
setivar 5 359 5 436 50 4927 50 5012
setivar_object 5 343 5 300 50 715 50 629
setivar_young 5 341 5 303 50 797 50 647
str_concat 5 390 5 458 50 1206 50 1169
structaref 5 156 5 192 50 1811 50 1886
structaset 5 203 5 239 50 396 50 492
throw 5 1088 5 1401 50 1415 50 1810

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) 1549019 1305303 203 2668 0 0% 0 0 75.725037
chunky-png (click) 319764 285663 79 1376 1 0% 0 0 39.238311
erubi-rails (click) 1374803 1188121 268 3626 22 0% 0 0 96.035481
hexapdf (click) 1528755 1358823 594 15766 44 0% 0 0 437.585865
liquid-c (click) 561791 475618 114 2236 5 0% 0 0 59.811662
liquid-compile (click) 482874 434318 146 2742 2 0% 0 0 79.149637
liquid-render (click) 652200 638106 131 2959 8 0% 0 0 79.309415
lobsters (click) 8691342 7229710 3124 64105 122 0% 0 0 2095.435024
mail (click) 873227 832303 345 7728 40 0% 0 0 212.399149
psych-load (click) 287062 247081 61 831 2 0% 0 0 23.781513
railsbench (click) 3373998 2933867 1592 19930 97 0% 0 0 556.605793
rubocop (click) 5779650 5085774 3002 57101 126 0% 6 0 1664.406332
ruby-lsp (click) 1039113 827857 408 7446 46 0% 1 0 203.927126
sequel (click) 503021 422048 11 119 0 0% 0 0 3.924456
shipit (click) 7491690 6304260 3370 53734 176 0% 1 0 1776.158336
addressable-equality (click) 317387 252349 44 1380 1 0% 0 0 34.246398
addressable-getters (click) 265572 197751 26 865 0 0% 0 0 21.154845
addressable-join (click) 283093 252956 24 941 0 0% 0 0 23.367285
addressable-merge (click) 283028 230819 27 896 0 0% 0 0 22.047784
addressable-new (click) 257113 243355 21 563 0 0% 0 0 14.077509
addressable-normalize (click) 312854 263834 43 1327 1 0% 0 0 32.536355
addressable-parse (click) 280437 229954 26 880 0 0% 0 0 21.494147
addressable-setters (click) 258150 238919 20 582 0 0% 0 0 14.381782
addressable-to-s (click) 279293 245849 26 889 0 0% 0 0 21.262683
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.820387
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.04343
erubi (click) 247598 204816 6 134 0 0% 0 0 3.918853
etanni (click) 32900 34696 8 114 0 0% 0 0 3.434471
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.993039
fluentd (click) 487528 452288 7 116 0 0% 0 0 3.724769
graphql (click) 410306 358367 73 1909 19 0% 0 0 53.151853
graphql-native (click) 352921 281595 39 532 0 0% 0 0 14.034882
knucleotide (click) 9939 10477 7 110 0 0% 0 0 5.003196
lee (click) 311804 231313 49 1102 0 0% 0 0 31.349292
matmul (click) 11103 4709 8 136 0 0% 0 0 4.203769
nbody (click) 14448 21176 6 251 0 0% 0 0 6.08042
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.388728
optcarrot (click) 319416 277986 188 4589 34 0% 0 0 109.13768
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 72.735307
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 44.00485
rack (click) 286407 255736 35 628 0 0% 0 0 16.333706
ruby-json (click) 20323 18532 8 206 0 0% 0 0 5.676464
rubyboy (click) 691998 632412 154 6873 42 0% 0 0 167.338269
rubykon (click) 150957 150670 138 2135 4 0% 0 0 57.074743
sudoku (click) 51776 65830 7 871 0 0% 0 0 23.00712
tinygql (click) 300272 270233 59 1031 5 0% 0 0 26.986372
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1944.22818
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 489.046348
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.08848
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.4999
fib (click) 2659 2995 3 30 0 0% 0 0 1.120504
getivar (click) 3789 6778 3 79 0 0% 0 0 1.938008
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.340995
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.807364
loops-times (click) 7093 8387 5 100 0 0% 0 0 3.025083
object-new (click) 2406 2818 2 36 0 0% 0 0 1.089256
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.121634
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.819516
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.812107
send_cfunc_block (click) 13777 10257 5 192 0 0% 0 0 3.765081
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.451704
setivar (click) 2783 3726 3 46 0 0% 0 0 1.275459
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.388888
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.67174
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.429121
structaref (click) 4407 9095 3 88 0 0% 0 0 2.305411
structaset (click) 4113 5834 3 70 0 0% 0 0 1.810148
throw (click) 5953 4624 5 53 0 0% 0 0 1.787251

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.