Ruby Benchmarks

Details for Benchmarks at 2025-11-06 00:39:45 UTC

YJIT metrics from the ruby-bench suite using Ruby 02267417da.

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 89.4% faster than CRuby 3.5.0dev
  • 2.2% slower than YJIT 3.4.7
On railsbench it is
  • 102.8% faster than CRuby 3.5.0dev
  • 2.7% faster than YJIT 3.4.7
x86_64 runtime: 7 hours, 25 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 3.5.0dev warmups CRuby 3.5.0dev iters YJIT 3.4.7 warmups YJIT 3.4.7 iters YJIT 3.5.0dev warmups YJIT 3.5.0dev iters
activerecord 5 83 5 87 50 196 50 225
chunky-png 5 31 5 31 50 33 50 26
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 423 5 382 50 630 50 542
liquid-compile 5 406 5 469 50 581 50 713
liquid-render 5 172 5 167 50 436 50 379
lobsters 5 20 5 20 50 10 50 10
mail 5 195 5 179 50 254 50 158
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 153 5 157 50 247 50 248
ruby-lsp 5 146 5 147 50 231 50 241
sequel 5 421 5 422 50 588 50 574
shipit 5 10 5 10 50 10 50 10
binarytrees 5 82 5 82 50 136 50 125
blurhash 5 83 5 86 50 143 50 144
erubi 5 137 5 130 50 121 50 121
etanni 5 99 5 63 50 71 50 28
fannkuchredux 5 54 5 56 50 101 50 101
fluentd 5 56 5 56 50 20 50 29
graphql 5 371 5 454 50 570 50 891
graphql-native 5 59 5 77 50 23 50 62
knucleotide 5 163 5 157 50 118 50 111
lee 5 23 5 23 50 10 50 10
matmul 5 51 5 49 50 94 50 88
nbody 5 247 5 261 50 676 50 689
nqueens 5 116 5 128 50 556 50 554
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 179 50 707 50 656
protoboeuf-encode 5 196 5 198 50 831 50 788
rack 5 445 5 436 50 722 50 682
ruby-json 5 84 5 93 50 50 50 66
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 49 50 157 50 149
tinygql 5 41 5 41 50 40 50 45
30k_ifelse 5 28 5 28 50 186 50 185
30k_methods 5 38 5 40 50 456 50 457
attr_accessor 5 157 5 192 50 1836 50 1912
cfunc_itself 5 347 5 343 50 1255 50 1259
fib 5 124 5 142 50 939 50 939
getivar 5 218 5 282 50 2316 50 2394
keyword_args 5 100 5 105 50 1240 50 1243
loops-times 5 23 5 25 50 64 50 57
object-new 5 268 5 352 50 297 50 588
respond_to 5 139 5 137 50 3888 50 3891
ruby-xor 5 236 5 245 50 1314 50 1280
send_bmethod 5 116 5 123 50 5538 50 5538
send_cfunc_block 5 105 5 105 50 353 50 334
send_rubyfunc_block 5 249 5 256 50 6922 50 6918
setivar 5 360 5 343 50 4926 50 4914
setivar_object 5 341 5 319 50 750 50 541
setivar_young 5 341 5 319 50 794 50 559
str_concat 5 390 5 388 50 1201 50 1013
structaref 5 156 5 189 50 1810 50 1877
throw 5 1090 5 1238 50 1412 50 1578

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) 1550724 1348821 205 2579 0 0% 0 0 73.594158
chunky-png (click) 318824 277771 74 1322 1 0% 0 0 37.803576
erubi-rails (click) 1974336 1753002 261 3689 22 0% 0 0 99.55847
hexapdf (click) 1523475 1307499 593 15679 44 0% 0 0 436.263963
liquid-c (click) 556118 446804 114 2228 5 0% 0 0 60.295294
liquid-compile (click) 476003 346234 146 2702 2 0% 0 0 79.193093
liquid-render (click) 654406 503905 131 2946 8 0% 0 0 81.224004
lobsters (click) 8459455 7040580 3100 62403 118 0% 0 0 2102.051355
mail (click) 868728 805852 342 7736 40 0% 0 0 214.74227
psych-load (click) 289055 226337 61 832 2 0% 0 0 24.040062
railsbench (click) 3365081 2870843 1605 19658 47 0% 0 0 551.351322
rubocop (click) 5758090 4955352 3001 56850 125 0% 6 0 1671.187358
ruby-lsp (click) 961631 866069 346 6764 43 0% 1 0 182.263592
sequel (click) 503214 448458 11 119 0 0% 0 0 3.800765
shipit (click) 7812469 6669232 3399 55319 186 0% 1 0 1900.563892
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.835528
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.9622
erubi (click) 248283 191076 6 134 0 0% 0 0 4.028162
etanni (click) 32930 35718 8 114 0 0% 0 0 3.688428
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.033578
fluentd (click) 482365 457724 7 115 0 0% 0 0 3.747369
graphql (click) 397828 356562 73 1921 18 0% 0 0 53.655547
graphql-native (click) 354941 263151 39 532 0 0% 0 0 14.057996
knucleotide (click) 9997 11103 7 113 0 0% 0 0 7.20464
lee (click) 318628 305763 49 1097 0 0% 0 0 31.846441
matmul (click) 11103 4709 8 136 0 0% 0 0 4.257814
nbody (click) 14448 21176 6 251 0 0% 0 0 6.24278
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.346794
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 112.227046
protoboeuf (click) 170129 177717 12 2837 0 0% 0 0 73.0898
protoboeuf-encode (click) 243065 283735 14 1816 0 0% 0 0 44.545241
rack (click) 268807 211448 35 580 0 0% 0 0 15.041019
ruby-json (click) 19868 17928 8 206 0 0% 0 0 5.685074
rubyboy (click) 695411 604348 154 6864 42 0% 0 0 166.928965
rubykon (click) 146229 162118 137 2070 3 0% 0 0 56.684238
sudoku (click) 52278 66593 7 878 0 0% 0 0 23.36509
tinygql (click) 298524 196340 59 1031 5 0% 0 0 27.049181
30k_ifelse (click) 6222887 5052688 9260 75477 0 0% 0 0 1935.052339
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 491.450812
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.165664
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.526114
fib (click) 2659 2995 3 30 0 0% 0 0 1.154147
getivar (click) 3789 6778 3 79 0 0% 0 0 2.01176
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.891064
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.950439
object-new (click) 2406 2818 2 36 0 0% 0 0 1.107337
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.197294
ruby-xor (click) 6026 856 4 105 0 0% 0 0 2.851378
send_bmethod (click) 5238 4968 6 71 0 0% 0 0 1.760792
send_cfunc_block (click) 14669 12471 5 195 0 0% 0 0 4.343471
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.548993
setivar (click) 2783 3726 3 46 0 0% 0 0 1.316513
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.46669
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.765337
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.504973
structaref (click) 4407 9095 3 88 0 0% 0 0 2.407106
throw (click) 5953 4624 5 53 0 0% 0 0 1.848284

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.