Ruby Benchmarks

Details for Benchmarks at 2025-09-26 01:04:05 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 92.4% faster than CRuby 3.5.0dev
  • 5.1% faster than YJIT 3.3.6
On railsbench it is
  • 109.4% faster than CRuby 3.5.0dev
  • 4.1% faster than YJIT 3.3.6
x86_64 runtime: 6 hours, 45 minutes
aarch64 runtime: 5 hours, 51 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 84 5 85 50 179 50 221
chunky-png 5 31 5 32 50 14 50 29
erubi-rails 5 16 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 402 5 402 50 563 50 520
liquid-compile 5 409 5 470 50 542 50 718
liquid-render 5 170 5 169 50 407 50 382
lobsters 5 20 5 20 50 10 50 10
mail 5 189 5 175 50 240 50 209
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 139 5 140 50 212 50 220
ruby-lsp 5 140 5 144 50 245 50 242
sequel 5 414 5 424 50 596 50 574
shipit 5 10 5 10 50 10 50 10
binarytrees 5 84 5 80 50 142 50 125
blurhash 5 82 5 86 50 127 50 145
erubi 5 125 5 141 50 88 50 141
etanni 5 91 5 68 50 54 50 32
fannkuchredux 5 52 5 57 50 97 50 100
fluentd 5 62 5 57 50 24 50 28
graphql 5 336 5 438 50 465 50 918
graphql-native 5 51 5 81 50 13 50 63
lee 5 22 5 22 50 10 50 10
matmul 5 50 5 50 50 87 50 90
nbody 5 248 5 245 50 578 50 699
nqueens 5 120 5 128 50 74 50 555
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 172 5 176 50 621 50 666
protoboeuf-encode 5 178 5 206 50 324 50 815
rack 5 417 5 449 50 647 50 693
ruby-json 5 83 5 79 50 50 50 46
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 20 5 21 50 10 50 10
sudoku 5 48 5 51 50 162 50 150
tinygql 5 41 5 42 50 39 50 47
30k_ifelse 5 28 5 27 50 215 50 182
30k_methods 5 38 5 37 50 478 50 475
attr_accessor 5 159 5 202 50 1726 50 1916
cfunc_itself 5 338 5 365 50 1137 50 1258
fib 5 126 5 130 50 912 50 935
getivar 5 212 5 339 50 2257 50 2436
keyword_args 5 104 5 99 50 1032 50 1241
loops-times 5 24 5 24 50 47 50 57
object-new 5 318 5 352 50 405 50 580
respond_to 5 133 5 134 50 3252 50 3892
ruby-xor 5 243 5 250 50 797 50 1274
setivar 5 361 5 384 50 3092 50 4960
setivar_object 5 358 5 358 50 685 50 552
setivar_young 5 368 5 359 50 699 50 562
str_concat 5 391 5 437 50 979 50 1083
throw 5 1258 5 1164 50 1752 50 1569

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) 1533453 1336817 205 2577 0 0% 0 0 72.653013
chunky-png (click) 305866 287773 74 1322 1 0% 0 0 38.022985
erubi-rails (click) 1935421 1621806 261 3666 22 0% 0 0 100.044607
hexapdf (click) 1502294 1339692 593 15678 43 0% 0 0 438.922784
liquid-c (click) 541140 436812 114 2228 5 0% 0 0 60.006971
liquid-compile (click) 453604 385753 146 2722 2 0% 0 0 80.215195
liquid-render (click) 649474 610259 131 2946 8 0% 0 0 80.169155
lobsters (click) 8551475 7230844 3120 63588 118 0% 0 0 2102.497368
mail (click) 856540 807457 342 7696 40 0% 0 0 214.324703
psych-load (click) 276081 228807 61 830 2 0% 0 0 24.239032
railsbench (click) 3327003 2808268 1605 19536 47 0% 0 0 583.132558
rubocop (click) 6122483 5278235 3014 63655 156 0% 6 0 1827.088319
ruby-lsp (click) 961521 895876 347 6802 44 0% 1 0 183.555811
sequel (click) 494589 437190 11 119 0 0% 0 0 4.007221
shipit (click) 7734537 6295622 3345 53733 183 0% 1 0 1719.11192
binarytrees (click) 7273 6911 6 64 0 0% 0 0 2.578611
blurhash (click) 52295 51444 27 603 0 0% 0 0 17.675772
erubi (click) 247203 221893 5 125 0 0% 0 0 3.779007
etanni (click) 32930 35718 8 114 0 0% 0 0 3.620988
fannkuchredux (click) 24746 40953 3 399 0 0% 0 0 10.75316
fluentd (click) 465529 411292 7 115 0 0% 0 0 3.776865
graphql (click) 391008 355519 73 1920 18 0% 0 0 54.231682
graphql-native (click) 346444 301158 39 532 0 0% 0 0 14.08334
lee (click) 310638 287327 49 1070 0 0% 0 0 31.445146
matmul (click) 11125 4603 8 132 0 0% 0 0 4.24438
nbody (click) 13890 20235 6 238 0 0% 0 0 5.890028
nqueens (click) 22652 36960 5 387 0 0% 0 0 10.123931
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 111.691157
protoboeuf (click) 170160 177773 12 2836 0 0% 0 0 72.252066
protoboeuf-encode (click) 243046 283791 14 1815 0 0% 0 0 44.511507
rack (click) 274418 240108 35 580 0 0% 0 0 15.209853
ruby-json (click) 19791 17761 8 204 0 0% 0 0 5.601882
rubyboy (click) 685633 560338 154 6858 42 0% 0 0 168.278934
rubykon (click) 146441 162602 137 2076 3 0% 0 0 56.885079
sudoku (click) 52157 66291 7 871 0 0% 0 0 23.00677
tinygql (click) 300433 262710 59 1031 5 0% 0 0 27.298185
30k_ifelse (click) 6219958 5057296 9259 75432 0 0% 0 0 1928.019278
30k_methods (click) 2234566 1592952 5778 19357 0 0% 0 0 479.827826
attr_accessor (click) 4372 7952 3 78 0 0% 0 0 2.196908
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.504728
fib (click) 2659 2995 3 30 0 0% 0 0 1.111182
getivar (click) 3812 6802 3 78 0 0% 0 0 1.972548
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.857271
loops-times (click) 6972 8013 5 93 0 0% 0 0 2.819658
object-new (click) 2406 2818 2 36 0 0% 0 0 1.090502
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.182375
ruby-xor (click) 5876 8690 4 100 0 0% 0 0 2.700232
setivar (click) 2783 3726 3 46 0 0% 0 0 1.287024
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.463457
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.749959
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.512154
throw (click) 5953 4624 5 53 0 0% 0 0 1.812962

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.