Ruby Benchmarks

Details for Benchmarks at 2025-09-12 03:45:28 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 93.0% faster than CRuby 3.5.0dev
  • 6.9% faster than YJIT 3.3.6
On railsbench it is
  • 97.5% faster than CRuby 3.5.0dev
  • 6.2% 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 83 5 87 50 179 50 211
chunky-png 5 31 5 31 50 14 50 27
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 422 5 400 50 573 50 560
liquid-compile 5 413 5 464 50 539 50 712
liquid-render 5 172 5 167 50 416 50 380
lobsters 5 20 5 20 50 10 50 10
mail 5 195 5 172 50 250 50 217
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 212 50 215
ruby-lsp 5 143 5 146 50 222 50 242
sequel 5 433 5 436 50 601 50 594
shipit 5 10 5 10 50 10 50 10
binarytrees 5 84 5 82 50 146 50 125
blurhash 5 82 5 87 50 127 50 145
erubi 5 128 5 137 50 100 50 132
etanni 5 90 5 70 50 53 50 34
fannkuchredux 5 52 5 57 50 97 50 92
fluentd 5 62 5 61 50 25 50 30
graphql 5 335 5 458 50 468 50 936
graphql-native 5 51 5 80 50 13 50 63
lee 5 22 5 23 50 10 50 10
matmul 5 51 5 54 50 88 50 86
nbody 5 249 5 264 50 585 50 703
nqueens 5 120 5 129 50 74 50 543
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 179 5 189 50 621 50 724
protoboeuf-encode 5 173 5 192 50 328 50 776
rack 5 420 5 444 50 646 50 704
ruby-json 5 83 5 83 50 50 50 53
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 41 5 43 50 42 50 48
30k_ifelse 5 28 5 28 50 217 50 185
30k_methods 5 39 5 38 50 479 50 477
attr_accessor 5 157 5 206 50 1720 50 1916
cfunc_itself 5 360 5 345 50 1137 50 1258
fib 5 127 5 143 50 903 50 931
getivar 5 212 5 314 50 2250 50 2400
keyword_args 5 104 5 105 50 1034 50 1243
loops-times 5 24 5 26 50 48 50 56
object-new 5 318 5 312 50 405 50 469
respond_to 5 133 5 139 50 3256 50 3902
ruby-xor 5 245 5 196 50 800 50 1276
setivar 5 361 5 379 50 3176 50 4958
setivar_object 5 353 5 337 50 670 50 632
setivar_young 5 367 5 340 50 704 50 661
str_concat 5 397 5 449 50 980 50 1206
throw 5 1273 5 1118 50 1720 50 1374

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) 1536765 1372329 203 2570 0 0% 0 0 74.462217
chunky-png (click) 317197 283396 74 1322 1 0% 0 0 39.108543
erubi-rails (click) 1934640 1629191 262 3666 22 0% 0 0 102.221949
hexapdf (click) 1513866 1327386 594 15682 43 0% 0 0 454.347342
liquid-c (click) 538797 459437 114 2228 5 0% 0 0 63.48911
liquid-compile (click) 463604 437153 146 2696 2 0% 0 0 80.56645
liquid-render (click) 647815 519658 131 2946 8 0% 0 0 81.859318
lobsters (click) 8536866 7252505 3118 63359 118 0% 0 0 2182.434496
mail (click) 857080 783511 342 7696 40 0% 0 0 224.221308
psych-load (click) 281332 232176 61 830 2 0% 0 0 24.445648
railsbench (click) 3330835 2951961 1605 19608 47 0% 0 0 574.911137
rubocop (click) 6121573 5367725 3014 63655 156 0% 6 0 1855.12785
ruby-lsp (click) 961161 863104 347 6796 44 0% 1 0 187.280024
sequel (click) 494954 429214 11 119 0 0% 0 0 3.963967
shipit (click) 7641114 6440346 3289 52483 184 0% 0 0 1716.651257
binarytrees (click) 7273 6911 6 64 0 0% 0 0 2.605639
blurhash (click) 52295 51444 27 603 0 0% 0 0 18.173828
erubi (click) 247875 222482 5 125 0 0% 0 0 3.768947
etanni (click) 32930 35718 8 114 0 0% 0 0 3.654305
fannkuchredux (click) 24746 40953 3 399 0 0% 0 0 11.184484
fluentd (click) 464606 394344 7 115 0 0% 0 0 3.812084
graphql (click) 402455 367664 73 1920 19 0% 0 0 54.871972
graphql-native (click) 345751 259388 39 532 0 0% 0 0 14.379234
lee (click) 308134 285322 49 1070 0 0% 0 0 31.618001
matmul (click) 11125 4603 8 132 0 0% 0 0 4.208385
nbody (click) 13890 20235 6 238 0 0% 0 0 5.835458
nqueens (click) 22652 36960 5 387 0 0% 0 0 10.548021
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 113.849129
protoboeuf (click) 170160 177773 12 2836 0 0% 0 0 76.77623
protoboeuf-encode (click) 243046 283791 14 1815 0 0% 0 0 46.935469
rack (click) 274340 256347 35 580 0 0% 0 0 15.67559
ruby-json (click) 19776 17761 8 204 0 0% 0 0 5.699484
rubyboy (click) 688772 619814 154 6860 42 0% 0 0 174.820443
rubykon (click) 146229 162118 137 2070 3 0% 0 0 57.158007
sudoku (click) 52157 66291 7 871 0 0% 0 0 24.04358
tinygql (click) 301100 246910 59 1031 5 0% 0 0 27.624553
30k_ifelse (click) 6219958 5057296 9259 75432 0 0% 0 0 1968.694292
30k_methods (click) 2234566 1592952 5778 19357 0 0% 0 0 484.751739
attr_accessor (click) 4372 7952 3 78 0 0% 0 0 2.060959
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.499193
fib (click) 2659 2995 3 30 0 0% 0 0 1.09388
getivar (click) 3812 6802 3 78 0 0% 0 0 1.942488
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.759697
loops-times (click) 6972 8013 5 93 0 0% 0 0 2.786615
object-new (click) 2406 2818 2 36 0 0% 0 0 1.083775
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.146137
ruby-xor (click) 5876 8690 4 100 0 0% 0 0 2.700045
setivar (click) 2783 3726 3 46 0 0% 0 0 1.243679
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.420726
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.722313
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.472775
throw (click) 5953 4624 5 53 0 0% 0 0 1.797157

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.