Ruby Benchmarks

Details for Benchmarks at 2026-01-10 00:42:50 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 93.8% faster than CRuby 4.1.0dev
  • 4.2% faster than YJIT 3.4.7
On railsbench it is
  • 116.7% faster than CRuby 4.1.0dev
  • 11.0% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 19 minutes
aarch64 runtime: 7 hours, 12 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 99 50 199 50 234
chunky-png 5 31 5 33 50 33 50 28
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 419 5 432 50 625 50 638
liquid-compile 5 418 5 475 50 582 50 716
liquid-render 5 172 5 174 50 438 50 431
mail 5 195 5 189 50 253 50 260
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 157 50 247 50 252
ruby-lsp 5 155 5 161 50 226 50 226
sequel 5 426 5 422 50 583 50 591
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 27 50 11 50 10
addressable-getters 5 164 5 167 50 184 50 195
addressable-join 5 74 5 77 50 66 50 69
addressable-merge 5 160 5 156 50 223 50 220
addressable-new 5 357 5 351 50 523 50 515
addressable-normalize 5 53 5 53 50 59 50 57
addressable-parse 5 103 5 105 50 104 50 109
addressable-setters 5 184 5 178 50 229 50 228
addressable-to-s 5 164 5 167 50 183 50 194
binarytrees 5 82 5 82 50 136 50 128
blurhash 5 83 5 87 50 143 50 145
erubi 5 128 5 147 50 137 50 154
etanni 5 98 5 69 50 71 50 35
fannkuchredux 5 54 5 55 50 101 50 100
fluentd 5 56 5 63 50 29 50 31
graphql 5 368 5 468 50 533 50 953
graphql-native 5 59 5 77 50 22 50 66
knucleotide 5 164 5 154 50 118 50 109
lee 5 23 5 23 50 10 50 10
matmul 5 51 5 54 50 94 50 96
nbody 5 247 5 276 50 676 50 706
nqueens 5 116 5 119 50 556 50 591
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 173 5 185 50 706 50 755
protoboeuf-encode 5 197 5 205 50 834 50 813
rack 5 440 5 448 50 714 50 694
ruby-json 5 82 5 99 50 46 50 71
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 165
tinygql 5 41 5 43 50 40 50 48
30k_ifelse 5 28 5 28 50 185 50 184
30k_methods 5 38 5 41 50 454 50 457
attr_accessor 5 158 5 203 50 1833 50 1926
cfunc_itself 5 348 5 353 50 1254 50 1259
fib 5 124 5 144 50 940 50 940
getivar 5 218 5 331 50 2316 50 2437
getivar-module 5 104 5 140 50 90 50 269
keyword_args 5 100 5 106 50 1239 50 1243
loops-times 5 23 5 26 50 64 50 60
object-new 5 268 5 367 50 298 50 691
respond_to 5 139 5 138 50 3888 50 3905
ruby-xor 5 237 5 242 50 1314 50 1290
send_bmethod 5 116 5 124 50 5539 50 4528
send_cfunc_block 5 105 5 107 50 353 50 332
send_rubyfunc_block 5 251 5 248 50 6923 50 6926
setivar 5 360 5 474 50 4925 50 5038
setivar_object 5 341 5 302 50 747 50 639
setivar_young 5 341 5 305 50 798 50 660
str_concat 5 391 5 447 50 1198 50 1191
structaref 5 157 5 200 50 1813 50 1904
structaset 5 201 5 264 50 397 50 897
throw 5 1090 5 1267 50 1419 50 1568

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) 1546233 1299806 203 2651 0 0% 0 0 77.379924
chunky-png (click) 319053 260934 79 1373 1 0% 0 0 39.380113
erubi-rails (click) 1364826 1166593 268 3652 22 0% 0 0 97.661531
hexapdf (click) 1522633 1321442 593 15671 44 0% 0 0 443.087708
liquid-c (click) 556719 512237 114 2228 5 0% 0 0 59.697584
liquid-compile (click) 482542 410225 146 2752 2 0% 0 0 81.717876
liquid-render (click) 663298 570955 131 2946 8 0% 0 0 79.736422
mail (click) 867564 862380 345 7721 40 0% 0 0 215.515998
psych-load (click) 288196 265770 61 828 2 0% 0 0 24.043654
railsbench (click) 3352124 2865795 1591 19792 97 0% 0 0 558.750952
rubocop (click) 5767097 4940460 3002 56963 125 0% 6 0 1681.795221
ruby-lsp (click) 1035178 902884 408 7384 47 0% 1 0 205.706151
sequel (click) 502774 439213 11 119 0 0% 0 0 3.909847
shipit (click) 7518763 6252745 3283 52156 181 0% 0 0 1749.512184
addressable-equality (click) 317021 268716 44 1381 1 0% 0 0 34.396575
addressable-getters (click) 277854 220203 26 869 0 0% 0 0 21.29563
addressable-join (click) 282703 219959 24 941 0 0% 0 0 24.195722
addressable-merge (click) 282734 247093 27 896 0 0% 0 0 22.689933
addressable-new (click) 255927 226767 21 563 0 0% 0 0 14.314231
addressable-normalize (click) 300688 275450 43 1353 1 0% 0 0 33.502617
addressable-parse (click) 278421 260403 26 880 0 0% 0 0 22.072256
addressable-setters (click) 257760 214114 20 582 0 0% 0 0 14.607473
addressable-to-s (click) 278619 253579 26 889 0 0% 0 0 21.599093
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.814043
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.244005
erubi (click) 241842 209775 6 134 0 0% 0 0 4.016652
etanni (click) 33287 36246 8 113 0 0% 0 0 3.556386
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.108268
fluentd (click) 476469 416628 7 115 0 0% 0 0 3.85392
graphql (click) 411662 371071 73 1938 19 0% 0 0 55.774553
graphql-native (click) 354811 328024 39 532 0 0% 0 0 14.371953
knucleotide (click) 9997 11103 7 113 0 0% 0 0 5.158436
lee (click) 317550 304350 49 1094 0 0% 0 0 31.788853
matmul (click) 11103 4709 8 136 0 0% 0 0 4.295086
nbody (click) 14448 21176 6 251 0 0% 0 0 6.227991
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.456225
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 112.270087
protoboeuf (click) 169555 177006 12 2829 0 0% 0 0 72.824924
protoboeuf-encode (click) 242967 283659 14 1815 0 0% 0 0 44.895631
rack (click) 282822 276729 35 626 0 0% 0 0 16.349133
ruby-json (click) 20323 18532 8 206 0 0% 0 0 5.82329
rubyboy (click) 704123 630364 154 6864 42 0% 0 0 168.22464
rubykon (click) 147221 147074 137 2084 3 0% 0 0 57.279575
sudoku (click) 51704 65882 7 870 0 0% 0 0 23.395271
tinygql (click) 302738 247665 59 1031 5 0% 0 0 27.55153
30k_ifelse (click) 6222887 5052688 9260 75477 0 0% 0 0 1938.230431
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 493.858552
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.155527
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.540086
fib (click) 2659 2995 3 30 0 0% 0 0 1.183642
getivar (click) 3789 6778 3 79 0 0% 0 0 1.957947
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.370038
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.84311
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.950162
object-new (click) 2406 2818 2 36 0 0% 0 0 1.039336
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.208473
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.837414
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.843682
send_cfunc_block (click) 14429 12201 5 192 0 0% 0 0 4.187614
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.482867
setivar (click) 2783 3726 3 46 0 0% 0 0 1.294834
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.430223
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.740612
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.478524
structaref (click) 4407 9095 3 88 0 0% 0 0 2.377444
structaset (click) 4113 5834 3 70 0 0% 0 0 1.825392
throw (click) 5953 4624 5 53 0 0% 0 0 1.807918

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.