Ruby Benchmarks

Details for Benchmarks at 2025-10-18 01:02:51 UTC

YJIT metrics from the ruby-bench suite using Ruby 7989a2ff46.

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 93.2% faster than CRuby 3.5.0dev
  • the same speed as YJIT 3.4.7
On railsbench it is
  • 105.5% faster than CRuby 3.5.0dev
  • 2.8% faster than YJIT 3.4.7
x86_64 runtime: 6 hours, 40 minutes
aarch64 runtime: 5 hours, 46 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 86 50 197 50 225
chunky-png 5 31 5 32 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 420 5 392 50 630 50 552
liquid-compile 5 406 5 471 50 577 50 710
liquid-render 5 168 5 167 50 431 50 372
lobsters 5 20 5 20 50 10 50 10
mail 5 195 5 168 50 252 50 216
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 246 50 244
ruby-lsp 5 142 5 147 50 232 50 245
sequel 5 430 5 423 50 604 50 576
shipit 5 10 5 10 50 10 50 10
binarytrees 5 82 5 78 50 136 50 127
blurhash 5 83 5 87 50 143 50 145
erubi 5 136 5 131 50 133 50 126
etanni 5 98 5 67 50 72 50 29
fannkuchredux 5 54 5 57 50 101 50 104
fluentd 5 56 5 61 50 23 50 27
graphql 5 368 5 447 50 573 50 914
graphql-native 5 57 5 84 50 20 50 63
lee 5 23 5 23 50 10 50 10
matmul 5 51 5 52 50 94 50 92
nbody 5 247 5 267 50 704 50 694
nqueens 5 116 5 129 50 556 50 555
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 180 50 705 50 683
protoboeuf-encode 5 196 5 189 50 840 50 796
rack 5 436 5 433 50 711 50 687
ruby-json 5 82 5 80 50 47 50 46
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 159
tinygql 5 41 5 42 50 35 50 47
30k_ifelse 5 28 5 27 50 184 50 183
30k_methods 5 38 5 37 50 470 50 470
attr_accessor 5 158 5 199 50 1827 50 1909
cfunc_itself 5 348 5 354 50 1255 50 1258
fib 5 123 5 140 50 938 50 938
getivar 5 216 5 302 50 2312 50 2412
keyword_args 5 100 5 104 50 1240 50 1242
loops-times 5 23 5 23 50 62 50 57
object-new 5 268 5 348 50 299 50 587
respond_to 5 139 5 138 50 3889 50 3894
ruby-xor 5 236 5 247 50 1310 50 1273
setivar 5 360 5 352 50 4924 50 4923
setivar_object 5 339 5 324 50 745 50 545
setivar_young 5 341 5 324 50 793 50 565
str_concat 5 391 5 398 50 1199 50 1072
throw 5 1089 5 1102 50 1410 50 1550

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) 1549714 1323051 205 2579 0 0% 0 0 74.248865
chunky-png (click) 316655 283595 74 1322 1 0% 0 0 37.468932
erubi-rails (click) 1964254 1723887 261 3669 22 0% 0 0 99.978928
hexapdf (click) 1525322 1374966 593 15680 44 0% 0 0 439.532891
liquid-c (click) 555286 494652 114 2230 5 0% 0 0 60.406355
liquid-compile (click) 481391 417422 146 2750 2 0% 0 0 82.69113
liquid-render (click) 661413 601653 131 2946 8 0% 0 0 81.068543
lobsters (click) 8466200 7022472 3099 62498 118 0% 0 0 2193.694532
mail (click) 863337 792141 342 7696 40 0% 0 0 214.380945
psych-load (click) 289648 267724 61 830 2 0% 0 0 24.438616
railsbench (click) 3359387 2831412 1605 19640 47 0% 0 0 552.996541
rubocop (click) 5761384 4933760 3001 56866 125 0% 6 0 1675.870072
ruby-lsp (click) 961421 897959 346 6767 43 0% 1 0 182.271254
sequel (click) 502521 398408 11 119 0 0% 0 0 3.835089
shipit (click) 7924370 6768023 3396 55222 186 0% 1 0 1850.692957
binarytrees (click) 7273 6911 6 64 0 0% 0 0 2.627589
blurhash (click) 52295 51444 27 603 0 0% 0 0 17.656393
erubi (click) 246042 196526 5 125 0 0% 0 0 3.832338
etanni (click) 32930 35718 8 114 0 0% 0 0 3.663291
fannkuchredux (click) 24746 40953 3 399 0 0% 0 0 10.793951
fluentd (click) 490354 466308 7 115 0 0% 0 0 3.760972
graphql (click) 409696 336579 73 1920 19 0% 0 0 53.861423
graphql-native (click) 350705 307967 39 532 0 0% 0 0 13.905375
lee (click) 317215 312581 49 1070 0 0% 0 0 30.869968
matmul (click) 11125 4603 8 132 0 0% 0 0 4.234885
nbody (click) 13890 20235 6 238 0 0% 0 0 5.914767
nqueens (click) 22652 36960 5 387 0 0% 0 0 10.186657
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 111.787813
protoboeuf (click) 170160 177773 12 2836 0 0% 0 0 73.335144
protoboeuf-encode (click) 243046 283791 14 1815 0 0% 0 0 44.836245
rack (click) 280482 223601 35 580 0 0% 0 0 15.186715
ruby-json (click) 19791 17761 8 204 0 0% 0 0 5.616076
rubyboy (click) 702653 628524 154 6860 42 0% 0 0 168.965494
rubykon (click) 145449 177646 137 2062 3 0% 0 0 56.201721
sudoku (click) 52157 66291 7 871 0 0% 0 0 23.27093
tinygql (click) 299551 253950 59 1031 5 0% 0 0 27.550069
30k_ifelse (click) 6219958 5057296 9259 75432 0 0% 0 0 1936.586155
30k_methods (click) 2234566 1592952 5778 19357 0 0% 0 0 479.031107
attr_accessor (click) 4372 7952 3 78 0 0% 0 0 2.103656
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.511292
fib (click) 2659 2995 3 30 0 0% 0 0 1.135398
getivar (click) 3812 6802 3 78 0 0% 0 0 1.965764
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.861403
loops-times (click) 6972 8013 5 93 0 0% 0 0 2.805971
object-new (click) 2406 2818 2 36 0 0% 0 0 1.057327
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.147726
ruby-xor (click) 5876 8690 4 100 0 0% 0 0 2.719093
setivar (click) 2783 3726 3 46 0 0% 0 0 1.250737
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.466495
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.765338
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.513702
throw (click) 5953 4624 5 53 0 0% 0 0 1.807173

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.