Ruby Benchmarks

Details for Benchmarks at 2025-11-09 00:42:16 UTC

YJIT metrics from the ruby-bench suite using Ruby 79eed1158d.

Using the geomean of the headline benchmarks for x86 YJIT 4.0.0dev is
  • 86.3% faster than CRuby 4.0.0dev
  • 3.9% slower than YJIT 3.4.7
On railsbench it is
  • 103.1% faster than CRuby 4.0.0dev
  • 4.7% faster than YJIT 3.4.7
x86_64 runtime: 7 hours, 23 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 84 5 86 50 196 50 208
chunky-png 5 31 5 32 50 32 50 26
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 421 5 391 50 626 50 540
liquid-compile 5 405 5 469 50 546 50 682
liquid-render 5 172 5 166 50 414 50 360
lobsters 5 19 5 20 50 10 50 10
mail 5 195 5 137 50 253 50 117
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 247
ruby-lsp 5 137 5 147 50 235 50 245
sequel 5 419 5 413 50 586 50 569
shipit 5 10 5 10 50 10 50 10
binarytrees 5 80 5 80 50 136 50 125
blurhash 5 83 5 86 50 143 50 144
erubi 5 134 5 133 50 136 50 125
etanni 5 98 5 63 50 71 50 30
fannkuchredux 5 54 5 57 50 102 50 98
fluentd 5 56 5 56 50 26 50 26
graphql 5 373 5 458 50 575 50 902
graphql-native 5 58 5 82 50 23 50 61
knucleotide 5 163 5 158 50 117 50 113
lee 5 23 5 22 50 10 50 10
matmul 5 51 5 48 50 95 50 86
nbody 5 247 5 263 50 676 50 697
nqueens 5 116 5 123 50 557 50 557
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 173 5 179 50 707 50 643
protoboeuf-encode 5 197 5 199 50 831 50 799
rack 5 441 5 436 50 712 50 667
ruby-json 5 82 5 92 50 47 50 62
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 48 50 157 50 144
tinygql 5 41 5 42 50 36 50 47
30k_ifelse 5 28 5 28 50 184 50 183
30k_methods 5 38 5 41 50 457 50 457
attr_accessor 5 157 5 192 50 1837 50 1911
cfunc_itself 5 348 5 344 50 1254 50 1259
fib 5 124 5 136 50 939 50 939
getivar 5 218 5 290 50 2317 50 2404
keyword_args 5 100 5 101 50 1239 50 1242
loops-times 5 23 5 25 50 63 50 50
object-new 5 268 5 355 50 300 50 579
respond_to 5 139 5 133 50 3892 50 3890
ruby-xor 5 237 5 248 50 1314 50 1276
send_bmethod 5 116 5 121 50 5539 50 5538
send_cfunc_block 5 105 5 99 50 353 50 330
send_rubyfunc_block 5 251 5 245 50 6922 50 6915
setivar 5 360 5 336 50 4928 50 4909
setivar_object 5 341 5 318 50 751 50 546
setivar_young 5 341 5 318 50 797 50 562
str_concat 5 391 5 387 50 1197 50 1006
structaref 5 157 5 189 50 1813 50 1879
throw 5 1089 5 1236 50 1416 50 1514

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) 1551769 1349867 205 2579 0 0% 0 0 73.368959
chunky-png (click) 317030 275877 74 1322 1 0% 0 0 37.609119
erubi-rails (click) 1379435 1225907 267 3678 22 0% 0 0 98.425261
hexapdf (click) 1525994 1392374 593 15684 44 0% 0 0 437.803716
liquid-c (click) 555199 470591 114 2228 5 0% 0 0 59.515936
liquid-compile (click) 476047 428178 146 2726 2 0% 0 0 79.011948
liquid-render (click) 650930 598560 131 2946 8 0% 0 0 80.115339
lobsters (click) 8524910 7200430 3101 62458 118 0% 0 0 2166.20623
mail (click) 860349 830029 342 7696 40 0% 0 0 213.597709
psych-load (click) 288659 250488 61 832 2 0% 0 0 23.849971
railsbench (click) 3350802 2903294 1605 19559 47 0% 0 0 552.536988
rubocop (click) 5763198 4968206 3001 56872 125 0% 6 0 1660.261563
ruby-lsp (click) 963185 883618 347 6784 44 0% 1 0 182.923277
sequel (click) 502855 464389 11 119 0 0% 0 0 3.912681
shipit (click) 7592468 6414708 3261 51757 180 0% 0 0 1714.317081
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.837534
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.854275
erubi (click) 247886 231631 6 134 0 0% 0 0 4.003176
etanni (click) 32930 35718 8 114 0 0% 0 0 3.62585
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.852254
fluentd (click) 490241 474509 7 115 0 0% 0 0 3.721607
graphql (click) 409256 352817 73 1921 19 0% 0 0 54.029705
graphql-native (click) 354838 287658 39 532 0 0% 0 0 14.108565
knucleotide (click) 9997 11103 7 113 0 0% 0 0 10.77253
lee (click) 318525 289270 49 1097 0 0% 0 0 31.576045
matmul (click) 11103 4709 8 136 0 0% 0 0 4.278391
nbody (click) 14448 21176 6 251 0 0% 0 0 6.209408
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.240079
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 111.373499
protoboeuf (click) 170129 177717 12 2837 0 0% 0 0 72.544347
protoboeuf-encode (click) 243065 283735 14 1816 0 0% 0 0 44.52553
rack (click) 282850 234826 35 580 0 0% 0 0 15.410689
ruby-json (click) 19868 17928 8 206 0 0% 0 0 5.700015
rubyboy (click) 703993 638617 154 6866 42 0% 0 0 168.417546
rubykon (click) 146229 162118 137 2070 3 0% 0 0 56.422921
sudoku (click) 52278 66593 7 878 0 0% 0 0 23.133895
tinygql (click) 300894 255786 59 1031 5 0% 0 0 26.816225
30k_ifelse (click) 6222887 5052688 9260 75477 0 0% 0 0 1932.866114
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 492.210857
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.158066
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.535819
fib (click) 2659 2995 3 30 0 0% 0 0 1.155344
getivar (click) 3789 6778 3 79 0 0% 0 0 1.975328
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.858682
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.902888
object-new (click) 2406 2818 2 36 0 0% 0 0 1.075657
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.137616
ruby-xor (click) 6026 856 4 105 0 0% 0 0 2.832784
send_bmethod (click) 5238 4968 6 71 0 0% 0 0 1.726678
send_cfunc_block (click) 14669 12471 5 195 0 0% 0 0 4.317771
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.465693
setivar (click) 2783 3726 3 46 0 0% 0 0 1.302526
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.475703
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.773331
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.482271
structaref (click) 4407 9095 3 88 0 0% 0 0 2.392172
throw (click) 5953 4624 5 53 0 0% 0 0 1.823224

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.