Ruby Benchmarks

Details for Benchmarks at 2025-10-28 01:02:59 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 90.2% faster than CRuby 3.5.0dev
  • the same speed as YJIT 3.4.7
On railsbench it is
  • 104.8% faster than CRuby 3.5.0dev
  • 2.3% faster than YJIT 3.4.7
x86_64 runtime: 6 hours, 56 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 85 5 87 50 188 50 214
chunky-png 5 31 5 32 50 33 50 27
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 421 5 400 50 629 50 518
liquid-compile 5 417 5 467 50 546 50 676
liquid-render 5 171 5 166 50 414 50 360
lobsters 5 20 5 20 50 10 50 10
mail 5 195 5 180 50 253 50 224
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 247
ruby-lsp 5 142 5 145 50 225 50 239
sequel 5 422 5 413 50 588 50 569
shipit 5 10 5 10 50 10 50 10
binarytrees 5 82 5 80 50 136 50 127
blurhash 5 83 5 88 50 143 50 144
erubi 5 137 5 134 50 137 50 127
etanni 5 98 5 66 50 72 50 31
fannkuchredux 5 55 5 56 50 102 50 100
fluentd 5 56 5 57 50 20 50 24
graphql 5 369 5 453 50 534 50 900
graphql-native 5 57 5 83 50 20 50 63
lee 5 23 5 23 50 10 50 10
matmul 5 51 5 54 50 94 50 91
nbody 5 247 5 283 50 704 50 698
nqueens 5 116 5 129 50 556 50 567
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 183 50 706 50 695
protoboeuf-encode 5 197 5 191 50 832 50 792
rack 5 441 5 441 50 710 50 682
ruby-json 5 82 5 79 50 47 50 45
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 47 50 154 50 158
tinygql 5 41 5 41 50 40 50 47
30k_ifelse 5 28 5 27 50 185 50 183
30k_methods 5 38 5 37 50 471 50 473
attr_accessor 5 157 5 197 50 1825 50 1915
cfunc_itself 5 348 5 257 50 1255 50 1258
fib 5 124 5 141 50 939 50 940
getivar 5 217 5 310 50 2313 50 2417
keyword_args 5 100 5 95 50 1240 50 1242
loops-times 5 23 5 24 50 62 50 57
object-new 5 268 5 354 50 299 50 592
respond_to 5 139 5 140 50 3890 50 3904
ruby-xor 5 236 5 249 50 1310 50 1275
send_bmethod 5 116 5 119 50 5538 50 5542
send_cfunc_block 5 106 5 106 50 353 50 344
send_rubyfunc_block 5 250 5 248 50 6921 50 6927
setivar 5 360 5 350 50 4925 50 4922
setivar_object 5 339 5 327 50 751 50 546
setivar_young 5 341 5 327 50 798 50 562
str_concat 5 390 5 414 50 1200 50 1023
throw 5 1088 5 1140 50 1418 50 1510

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) 1544916 1310384 205 2579 0 0% 0 0 72.929973
chunky-png (click) 315706 298730 74 1322 1 0% 0 0 37.639821
erubi-rails (click) 1975174 1785335 261 3738 22 0% 0 0 102.447361
hexapdf (click) 1521006 1338490 593 15699 44 0% 0 0 437.076335
liquid-c (click) 555479 495164 114 2228 5 0% 0 0 59.116447
liquid-compile (click) 478013 388965 146 2712 2 0% 0 0 81.441484
liquid-render (click) 650775 565357 131 2946 8 0% 0 0 79.047139
lobsters (click) 8451063 6999993 3099 62341 118 0% 0 0 2085.208203
mail (click) 863850 817498 342 7697 40 0% 0 0 211.304712
psych-load (click) 287667 257171 61 830 2 0% 0 0 23.928236
railsbench (click) 3353458 2954059 1605 19595 47 0% 0 0 548.049072
rubocop (click) 5760132 4883473 3001 56853 125 0% 6 0 1659.585565
ruby-lsp (click) 954417 791663 347 6796 44 0% 1 0 182.842174
sequel (click) 502117 406261 11 119 0 0% 0 0 3.877539
shipit (click) 7737837 6533182 3344 53459 181 0% 1 0 1769.049331
binarytrees (click) 7273 6911 6 64 0 0% 0 0 2.676583
blurhash (click) 52295 51444 27 603 0 0% 0 0 17.881589
erubi (click) 247891 239345 5 125 0 0% 0 0 3.891148
etanni (click) 32930 35718 8 114 0 0% 0 0 3.613514
fannkuchredux (click) 24746 40953 3 399 0 0% 0 0 10.900926
fluentd (click) 490016 441451 7 115 0 0% 0 0 3.701627
graphql (click) 409469 360877 73 1920 19 0% 0 0 54.053031
graphql-native (click) 354213 311433 39 532 0 0% 0 0 14.109552
lee (click) 305246 291319 49 1070 0 0% 0 0 31.285205
matmul (click) 11125 4603 8 132 0 0% 0 0 4.183791
nbody (click) 13890 20235 6 238 0 0% 0 0 5.860173
nqueens (click) 22652 36960 5 387 0 0% 0 0 10.233838
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 110.872902
protoboeuf (click) 170160 177773 12 2836 0 0% 0 0 72.659023
protoboeuf-encode (click) 243046 283791 14 1815 0 0% 0 0 44.41449
rack (click) 280745 248837 35 580 0 0% 0 0 15.06196
ruby-json (click) 19791 17761 8 204 0 0% 0 0 5.611311
rubyboy (click) 703220 654012 154 6858 42 0% 0 0 166.784806
rubykon (click) 146229 162118 137 2070 3 0% 0 0 55.730255
sudoku (click) 52157 66291 7 871 0 0% 0 0 23.166534
tinygql (click) 299883 271035 59 1031 5 0% 0 0 27.403133
30k_ifelse (click) 6219958 5057296 9259 75432 0 0% 0 0 1918.455551
30k_methods (click) 2234566 1592952 5778 19357 0 0% 0 0 471.480518
attr_accessor (click) 4372 7952 3 78 0 0% 0 0 2.151369
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.518177
fib (click) 2659 2995 3 30 0 0% 0 0 1.130319
getivar (click) 3812 6802 3 78 0 0% 0 0 1.970509
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.856982
loops-times (click) 6972 8013 5 93 0 0% 0 0 2.748044
object-new (click) 2406 2818 2 36 0 0% 0 0 1.070699
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.136007
ruby-xor (click) 5876 8690 4 100 0 0% 0 0 2.70662
send_bmethod (click) 5238 4968 6 71 0 0% 0 0 1.774946
send_cfunc_block (click) 14669 12471 5 195 0 0% 0 0 4.326128
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.488264
setivar (click) 2783 3726 3 46 0 0% 0 0 1.288149
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.456807
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.715393
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.500231
throw (click) 5953 4624 5 53 0 0% 0 0 1.841859

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.