Ruby Benchmarks

Details for Benchmarks at 2025-11-13 00:39:46 UTC

YJIT metrics from the ruby-bench suite using Ruby 37a05b591c.

Using the geomean of the headline benchmarks for x86 YJIT 4.0.0dev is
  • 92.8% faster than CRuby 4.0.0dev
  • the same speed as YJIT 3.4.7
On railsbench it is
  • 104.6% faster than CRuby 4.0.0dev
  • 4.4% faster than YJIT 3.4.7
x86_64 runtime: 7 hours, 3 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.0.0dev warmups CRuby 4.0.0dev iters YJIT 3.4.7 warmups YJIT 3.4.7 iters YJIT 4.0.0dev warmups YJIT 4.0.0dev iters
activerecord 5 83 5 87 50 194 50 224
chunky-png 5 31 5 33 50 32 50 30
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 422 5 396 50 624 50 575
liquid-compile 5 419 5 466 50 584 50 712
liquid-render 5 172 5 166 50 415 50 394
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 133 50 254 50 137
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 153 5 158 50 246 50 250
ruby-lsp 5 142 5 145 50 240 50 242
sequel 5 421 5 427 50 586 50 589
shipit 5 10 5 10 50 10 50 10
binarytrees 5 82 5 82 50 136 50 127
blurhash 5 83 5 87 50 143 50 145
erubi 5 132 5 143 50 123 50 142
etanni 5 98 5 69 50 72 50 33
fannkuchredux 5 54 5 56 50 96 50 101
fluentd 5 56 5 62 50 20 50 27
graphql 5 373 5 462 50 536 50 906
graphql-native 5 59 5 83 50 22 50 60
knucleotide 5 162 5 152 50 118 50 106
lee 5 23 5 22 50 10 50 10
matmul 5 51 5 51 50 94 50 91
nbody 5 247 5 269 50 677 50 661
nqueens 5 116 5 126 50 556 50 559
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 182 50 706 50 657
protoboeuf-encode 5 196 5 209 50 827 50 791
rack 5 438 5 448 50 716 50 690
ruby-json 5 82 5 93 50 47 50 67
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 20 50 10 50 10
sudoku 5 48 5 48 50 157 50 148
tinygql 5 40 5 44 50 36 50 48
30k_ifelse 5 28 5 28 50 185 50 183
30k_methods 5 38 5 40 50 457 50 447
attr_accessor 5 155 5 192 50 1834 50 1911
cfunc_itself 5 348 5 351 50 1255 50 1259
fib 5 124 5 140 50 938 50 939
getivar 5 217 5 304 50 2315 50 2414
keyword_args 5 100 5 107 50 1240 50 1242
loops-times 5 23 5 25 50 63 50 57
object-new 5 269 5 350 50 300 50 557
respond_to 5 139 5 129 50 3888 50 3904
ruby-xor 5 236 5 255 50 1314 50 1286
send_bmethod 5 116 5 124 50 5539 50 5536
send_cfunc_block 5 105 5 106 50 353 50 338
send_rubyfunc_block 5 250 5 246 50 6921 50 6918
setivar 5 360 5 364 50 4926 50 4940
setivar_object 5 341 5 346 50 751 50 583
setivar_young 5 341 5 347 50 798 50 618
str_concat 5 393 5 397 50 1197 50 1171
structaref 5 156 5 201 50 1812 50 1894
throw 5 1087 5 1235 50 1421 50 1529

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) 1550621 1315888 205 2579 0 0% 0 0 73.269272
chunky-png (click) 305569 263217 74 1322 1 0% 0 0 37.754203
erubi-rails (click) 1384096 1156460 267 3718 22 0% 0 0 99.632899
hexapdf (click) 1526073 1392205 594 15682 44 0% 0 0 441.810875
liquid-c (click) 556064 471300 114 2228 5 0% 0 0 59.327734
liquid-compile (click) 474748 418251 146 2709 2 0% 0 0 79.062118
liquid-render (click) 651222 541549 131 2946 8 0% 0 0 80.056569
lobsters (click) 8531629 7123240 3103 62523 118 0% 0 0 2107.626777
mail (click) 860349 854605 342 7696 40 0% 0 0 211.810408
psych-load (click) 288952 258996 61 832 2 0% 0 0 23.744645
railsbench (click) 3353160 2881663 1605 19552 47 0% 0 0 549.989441
rubocop (click) 5761829 4934671 3001 56864 125 0% 6 0 1661.026699
ruby-lsp (click) 963509 851082 347 6784 44 0% 1 0 183.091968
sequel (click) 503148 456597 11 119 0 0% 0 0 3.87808
shipit (click) 7610149 6381301 3261 51909 180 0% 0 0 1699.07354
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.866044
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.931836
erubi (click) 249661 217065 6 134 0 0% 0 0 3.981295
etanni (click) 32930 35718 8 114 0 0% 0 0 3.605165
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.87663
fluentd (click) 488855 440084 7 115 0 0% 0 0 3.755424
graphql (click) 406603 390343 73 1921 19 0% 0 0 53.775945
graphql-native (click) 349578 308050 39 532 0 0% 0 0 13.990333
knucleotide (click) 9997 11103 7 113 0 0% 0 0 8.882184
lee (click) 318525 281078 49 1097 0 0% 0 0 31.505337
matmul (click) 11103 4709 8 136 0 0% 0 0 4.293938
nbody (click) 14448 21176 6 251 0 0% 0 0 6.1484
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.134845
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 111.555725
protoboeuf (click) 170129 177717 12 2837 0 0% 0 0 73.283253
protoboeuf-encode (click) 243065 283735 14 1816 0 0% 0 0 45.125311
rack (click) 281364 241438 35 580 0 0% 0 0 15.136307
ruby-json (click) 19868 17928 8 206 0 0% 0 0 5.660237
rubyboy (click) 703748 564602 154 6866 42 0% 0 0 168.004178
rubykon (click) 146441 162602 137 2076 3 0% 0 0 56.699946
sudoku (click) 52278 66593 7 878 0 0% 0 0 23.33531
tinygql (click) 300845 272161 59 1031 5 0% 0 0 27.162211
30k_ifelse (click) 6222887 5052688 9260 75477 0 0% 0 0 1927.591653
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 487.753512
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.113563
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.536794
fib (click) 2659 2995 3 30 0 0% 0 0 1.167366
getivar (click) 3789 6778 3 79 0 0% 0 0 1.982615
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.840312
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.920411
object-new (click) 2406 2818 2 36 0 0% 0 0 1.110953
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.121982
ruby-xor (click) 6026 856 4 105 0 0% 0 0 2.851424
send_bmethod (click) 5238 4968 6 71 0 0% 0 0 1.725566
send_cfunc_block (click) 14669 12471 5 195 0 0% 0 0 4.300098
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.500028
setivar (click) 2783 3726 3 46 0 0% 0 0 1.304087
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.47434
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.753683
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.501217
structaref (click) 4407 9095 3 88 0 0% 0 0 2.407696
throw (click) 5953 4624 5 53 0 0% 0 0 1.806353

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.