Ruby Benchmarks

Details for Benchmarks at 2025-09-10 03:46:11 UTC

YJIT metrics from the ruby-bench suite using Ruby 8f040a571b.

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 93.5% faster than CRuby 3.5.0dev
  • 7.5% faster than YJIT 3.3.6
On railsbench it is
  • 103.3% faster than CRuby 3.5.0dev
  • 8.5% faster than YJIT 3.3.6
x86_64 runtime: 4 hours, 28 minutes
aarch64 runtime: 3 hours, 48 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.3.6 warmups CRuby 3.3.6 iters CRuby 3.5.0dev warmups CRuby 3.5.0dev iters YJIT 3.3.6 warmups YJIT 3.3.6 iters YJIT 3.5.0dev warmups YJIT 3.5.0dev iters
activerecord 5 82 5 86 50 177 50 220
chunky-png 5 31 5 33 50 15 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 392 50 571 50 537
liquid-compile 5 407 5 472 50 540 50 712
liquid-render 5 171 5 168 50 407 50 376
lobsters 5 20 5 20 50 10 50 10
mail 5 195 5 176 50 249 50 222
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 138 5 141 50 206 50 217
ruby-lsp 5 144 5 147 50 233 50 242
sequel 5 432 5 430 50 603 50 602
shipit 5 10 5 10 50 10 50 10
binarytrees 5 84 5 83 50 146 50 130
blurhash 5 82 5 87 50 127 50 145
erubi 5 127 5 142 50 88 50 132
etanni 5 90 5 70 50 53 50 35
fannkuchredux 5 52 5 57 50 97 50 95
fluentd 5 62 5 64 50 24 50 31
graphql 5 343 5 461 50 451 50 934
graphql-native 5 52 5 79 50 14 50 61
lee 5 23 5 23 50 10 50 10
matmul 5 51 5 52 50 88 50 79
nbody 5 249 5 253 50 585 50 701
nqueens 5 120 5 129 50 74 50 542
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 178 5 189 50 621 50 761
protoboeuf-encode 5 178 5 202 50 326 50 769
rack 5 424 5 441 50 639 50 685
ruby-json 5 83 5 83 50 50 50 52
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 52 50 163 50 140
tinygql 5 40 5 43 50 42 50 48
30k_ifelse 5 28 5 27 50 215 50 185
30k_methods 5 38 5 38 50 480 50 475
attr_accessor 5 157 5 208 50 1719 50 1921
cfunc_itself 5 356 5 363 50 1137 50 1258
fib 5 127 5 137 50 902 50 931
getivar 5 212 5 338 50 2250 50 2427
keyword_args 5 104 5 105 50 1034 50 1243
loops-times 5 24 5 25 50 48 50 56
object-new 5 318 5 313 50 405 50 484
respond_to 5 133 5 137 50 3257 50 3898
ruby-xor 5 245 5 254 50 799 50 1278
setivar 5 361 5 360 50 3190 50 4938
setivar_object 5 352 5 327 50 670 50 628
setivar_young 5 367 5 330 50 702 50 663
str_concat 5 397 5 461 50 977 50 1208
throw 5 1270 5 1116 50 1720 50 1373

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) 1535603 1306555 203 2570 0 0% 0 0 74.290372
chunky-png (click) 306737 280485 74 1330 1 0% 0 0 38.984949
erubi-rails (click) 1939688 1675896 262 3725 22 0% 0 0 104.104537
hexapdf (click) 1517222 1308576 593 15717 43 0% 0 0 457.19443
liquid-c (click) 529634 473578 114 2228 5 0% 0 0 61.541699
liquid-compile (click) 462703 403443 146 2691 2 0% 0 0 80.697377
liquid-render (click) 647257 601133 131 2946 8 0% 0 0 81.739916
lobsters (click) 8549146 7240248 3120 63541 118 0% 0 0 2153.036093
mail (click) 857392 857371 342 7701 40 0% 0 0 222.409301
psych-load (click) 281390 232286 61 830 2 0% 0 0 24.468125
railsbench (click) 3328521 2892720 1605 19542 43 0% 0 0 560.095885
rubocop (click) 6122218 5401338 3014 63664 156 0% 6 0 1869.317394
ruby-lsp (click) 958479 852845 346 6773 43 0% 1 0 190.139964
sequel (click) 486698 434912 11 119 0 0% 0 0 4.046766
shipit (click) 7630947 6287703 3288 52493 184 0% 0 0 1719.563859
binarytrees (click) 7273 6911 6 64 0 0% 0 0 2.641525
blurhash (click) 52295 51444 27 603 0 0% 0 0 18.254635
erubi (click) 245006 228343 5 125 0 0% 0 0 3.955699
etanni (click) 32930 35718 8 114 0 0% 0 0 3.630408
fannkuchredux (click) 24746 40953 3 399 0 0% 0 0 11.111304
fluentd (click) 464199 426719 7 115 0 0% 0 0 3.858756
graphql (click) 402789 367989 73 1920 19 0% 0 0 55.358946
graphql-native (click) 342973 281696 39 532 0 0% 0 0 14.408493
lee (click) 310958 263048 49 1070 0 0% 0 0 31.653864
matmul (click) 11125 4603 8 132 0 0% 0 0 4.208486
nbody (click) 13890 20235 6 238 0 0% 0 0 5.84921
nqueens (click) 22652 36960 5 387 0 0% 0 0 10.453432
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 112.536035
protoboeuf (click) 170160 177773 12 2836 0 0% 0 0 75.767519
protoboeuf-encode (click) 243046 283791 14 1815 0 0% 0 0 46.64502
rack (click) 274340 239995 35 580 0 0% 0 0 15.228507
ruby-json (click) 19776 17761 8 204 0 0% 0 0 5.736052
rubyboy (click) 677311 615925 154 6864 42 0% 0 0 174.694735
rubykon (click) 146229 162118 137 2070 3 0% 0 0 56.62225
sudoku (click) 52157 66291 7 871 0 0% 0 0 23.933269
tinygql (click) 297938 277051 59 1031 5 0% 0 0 28.048339
30k_ifelse (click) 6219958 5057296 9259 75432 0 0% 0 0 1956.748612
30k_methods (click) 2234566 1592952 5778 19357 0 0% 0 0 484.143822
attr_accessor (click) 4372 7952 3 78 0 0% 0 0 2.070994
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.502308
fib (click) 2659 2995 3 30 0 0% 0 0 1.075984
getivar (click) 3812 6802 3 78 0 0% 0 0 1.939637
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.79599
loops-times (click) 6972 8013 5 93 0 0% 0 0 2.738783
object-new (click) 2406 2818 2 36 0 0% 0 0 1.128573
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.152691
ruby-xor (click) 5876 8690 4 100 0 0% 0 0 2.705947
setivar (click) 2783 3726 3 46 0 0% 0 0 1.28508
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.396379
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.712517
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.473074
throw (click) 5953 4624 5 53 0 0% 0 0 1.807893

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.