Ruby Benchmarks

Details for Benchmarks at 2026-01-01 00:48:02 UTC

YJIT metrics from the ruby-bench suite using Ruby 7cf6cc83f3.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 97.4% faster than CRuby 4.1.0dev
  • 3.9% faster than YJIT 3.4.7
On railsbench it is
  • 110.4% faster than CRuby 4.1.0dev
  • 9.5% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 12 minutes
aarch64 runtime: 7 hours, 6 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 89 5 96 50 197 50 235
chunky-png 5 31 5 33 50 33 50 30
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 421 5 421 50 626 50 618
liquid-compile 5 405 5 469 50 556 50 700
liquid-render 5 172 5 173 50 433 50 431
mail 5 195 5 185 50 253 50 251
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 158 50 246 50 250
ruby-lsp 5 137 5 146 50 238 50 246
sequel 5 418 5 419 50 603 50 581
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 26 50 11 50 10
addressable-getters 5 163 5 163 50 184 50 181
addressable-join 5 72 5 75 50 64 50 65
addressable-merge 5 160 5 153 50 221 50 210
addressable-new 5 353 5 340 50 523 50 486
addressable-normalize 5 53 5 52 50 59 50 53
addressable-parse 5 103 5 101 50 104 50 100
addressable-setters 5 183 5 175 50 229 50 218
addressable-to-s 5 163 5 162 50 183 50 179
binarytrees 5 82 5 82 50 136 50 127
blurhash 5 83 5 87 50 143 50 145
erubi 5 129 5 146 50 133 50 148
etanni 5 98 5 70 50 71 50 35
fannkuchredux 5 55 5 57 50 102 50 101
fluentd 5 60 5 61 50 20 50 29
graphql 5 371 5 463 50 570 50 914
graphql-native 5 59 5 85 50 23 50 66
knucleotide 5 163 5 156 50 118 50 110
lee 5 23 5 24 50 10 50 10
matmul 5 51 5 53 50 94 50 96
nbody 5 246 5 272 50 676 50 705
nqueens 5 116 5 128 50 556 50 592
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 180 50 706 50 699
protoboeuf-encode 5 198 5 199 50 833 50 776
rack 5 442 5 446 50 707 50 673
ruby-json 5 81 5 93 50 46 50 64
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
sudoku 5 48 5 50 50 156 50 164
tinygql 5 41 5 43 50 35 50 48
30k_ifelse 5 28 5 28 50 185 50 180
30k_methods 5 38 5 40 50 451 50 453
attr_accessor 5 157 5 211 50 1834 50 1941
cfunc_itself 5 348 5 350 50 1255 50 1259
fib 5 124 5 145 50 939 50 939
getivar 5 216 5 315 50 2316 50 2422
getivar-module 5 104 5 141 50 90 50 270
keyword_args 5 99 5 111 50 1240 50 1243
loops-times 5 23 5 25 50 64 50 61
object-new 5 268 5 365 50 297 50 669
respond_to 5 139 5 139 50 3887 50 3896
ruby-xor 5 236 5 251 50 1314 50 1289
send_bmethod 5 117 5 121 50 5538 50 4528
send_cfunc_block 5 107 5 104 50 353 50 344
send_rubyfunc_block 5 250 5 250 50 6921 50 6922
setivar 5 360 5 488 50 4926 50 5047
setivar_object 5 341 5 304 50 750 50 537
setivar_young 5 341 5 308 50 796 50 557
str_concat 5 391 5 450 50 1201 50 1201
structaref 5 156 5 208 50 1811 50 1907
structaset 5 202 5 258 50 396 50 512
throw 5 1090 5 1284 50 1417 50 1545

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) 1542650 1320955 203 2646 0 0% 0 0 74.733161
chunky-png (click) 321862 272402 79 1381 1 0% 0 0 38.89993
erubi-rails (click) 1363626 1115259 269 3684 22 0% 0 0 99.630303
hexapdf (click) 1521085 1377250 593 15658 44 0% 0 0 436.190699
liquid-c (click) 557116 455694 114 2228 5 0% 0 0 60.539201
liquid-compile (click) 479222 373687 146 2709 2 0% 0 0 79.282694
liquid-render (click) 660005 607886 131 2946 8 0% 0 0 79.630812
mail (click) 867563 804712 345 7731 40 0% 0 0 214.158998
psych-load (click) 288196 265741 61 828 2 0% 0 0 23.386676
railsbench (click) 3348013 2967565 1591 19753 97 0% 0 0 552.610335
rubocop (click) 5756494 4936455 3002 56851 125 0% 6 0 1656.494848
ruby-lsp (click) 959700 913282 343 6720 44 0% 1 0 182.167317
sequel (click) 502357 430684 11 119 0 0% 0 0 3.94853
shipit (click) 7128473 6124931 3297 52141 170 0% 0 0 1721.42148
addressable-equality (click) 313694 281111 44 1381 0 0% 0 0 33.925986
addressable-getters (click) 277324 219629 26 863 0 0% 0 0 21.072887
addressable-join (click) 287285 242007 24 1005 0 0% 0 0 25.504717
addressable-merge (click) 282450 246836 27 896 0 0% 0 0 22.124353
addressable-new (click) 255706 217883 21 591 0 0% 0 0 14.56032
addressable-normalize (click) 312481 280079 43 1330 1 0% 0 0 32.592132
addressable-parse (click) 280041 237888 26 880 0 0% 0 0 22.057099
addressable-setters (click) 257755 214085 20 582 0 0% 0 0 14.457386
addressable-to-s (click) 273615 231048 26 849 0 0% 0 0 20.469382
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.834308
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.602804
erubi (click) 248119 198708 6 134 0 0% 0 0 3.908417
etanni (click) 33287 36246 8 113 0 0% 0 0 3.472577
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.740367
fluentd (click) 482727 415698 7 115 0 0% 0 0 3.701036
graphql (click) 410039 369406 73 1921 19 0% 0 0 53.677317
graphql-native (click) 354516 319575 39 532 0 0% 0 0 13.781113
knucleotide (click) 9997 11103 7 113 0 0% 0 0 6.202716
lee (click) 317524 296057 49 1097 0 0% 0 0 31.700186
matmul (click) 11103 4709 8 136 0 0% 0 0 4.308393
nbody (click) 14448 21176 6 251 0 0% 0 0 6.088699
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.094217
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 110.579315
protoboeuf (click) 169555 177006 12 2829 0 0% 0 0 71.92669
protoboeuf-encode (click) 242967 283659 14 1815 0 0% 0 0 44.437653
rack (click) 266867 224792 35 580 0 0% 0 0 14.870167
ruby-json (click) 20323 18532 8 206 0 0% 0 0 5.601227
rubyboy (click) 704402 638775 154 6864 42 0% 0 0 166.388154
rubykon (click) 146441 162602 137 2076 3 0% 0 0 55.822584
sudoku (click) 51704 65882 7 870 0 0% 0 0 22.839753
tinygql (click) 287623 273179 59 1031 5 0% 0 0 27.482473
30k_ifelse (click) 6222887 5052688 9260 75477 0 0% 0 0 1923.478347
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 491.996984
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.107168
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.530631
fib (click) 2659 2995 3 30 0 0% 0 0 1.127673
getivar (click) 3789 6778 3 79 0 0% 0 0 1.930933
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.290901
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.813865
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.919807
object-new (click) 2406 2818 2 36 0 0% 0 0 1.107859
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.120208
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.808705
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.800443
send_cfunc_block (click) 14429 12201 5 192 0 0% 0 0 4.117947
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.47633
setivar (click) 2783 3726 3 46 0 0% 0 0 1.260091
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.389083
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.71522
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.437746
structaref (click) 4407 9095 3 88 0 0% 0 0 2.340018
structaset (click) 3926 5614 3 70 0 0% 0 0 1.751052
throw (click) 5953 4624 5 53 0 0% 0 0 1.786467

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.