Ruby Benchmarks

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

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

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 92.4% faster than CRuby 3.5.0dev
  • the same speed as YJIT 3.4.7
On railsbench it is
  • 108.2% faster than CRuby 3.5.0dev
  • 3.1% faster than YJIT 3.4.7
x86_64 runtime: 6 hours, 55 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 84 5 85 50 191 50 214
chunky-png 5 31 5 32 50 32 50 28
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 420 5 383 50 622 50 512
liquid-compile 5 417 5 459 50 553 50 706
liquid-render 5 172 5 170 50 412 50 378
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 182 50 252 50 222
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 153 5 156 50 246 50 248
ruby-lsp 5 145 5 145 50 241 50 244
sequel 5 425 5 420 50 584 50 567
shipit 5 10 5 10 50 10 50 10
binarytrees 5 82 5 80 50 136 50 128
blurhash 5 83 5 88 50 143 50 144
erubi 5 135 5 135 50 137 50 126
etanni 5 97 5 66 50 72 50 30
fannkuchredux 5 55 5 57 50 102 50 100
fluentd 5 56 5 58 50 19 50 24
graphql 5 372 5 448 50 574 50 908
graphql-native 5 58 5 81 50 21 50 63
lee 5 23 5 23 50 10 50 10
matmul 5 51 5 55 50 95 50 91
nbody 5 247 5 291 50 702 50 697
nqueens 5 116 5 128 50 556 50 564
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 173 5 177 50 707 50 694
protoboeuf-encode 5 192 5 192 50 829 50 798
rack 5 439 5 433 50 721 50 678
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 49 50 157 50 158
tinygql 5 40 5 42 50 39 50 46
30k_ifelse 5 28 5 27 50 185 50 183
30k_methods 5 38 5 37 50 472 50 472
attr_accessor 5 158 5 198 50 1827 50 1912
cfunc_itself 5 347 5 347 50 1255 50 1258
fib 5 124 5 141 50 937 50 938
getivar 5 216 5 313 50 2309 50 2419
keyword_args 5 100 5 95 50 1240 50 1243
loops-times 5 23 5 25 50 62 50 57
object-new 5 269 5 347 50 298 50 576
respond_to 5 139 5 137 50 3890 50 3907
ruby-xor 5 236 5 243 50 1310 50 1273
send_bmethod 5 115 5 112 50 5538 50 5542
send_cfunc_block 5 105 5 106 50 360 50 345
send_rubyfunc_block 5 251 5 248 50 6918 50 6927
setivar 5 360 5 358 50 4928 50 4935
setivar_object 5 339 5 344 50 752 50 585
setivar_young 5 341 5 345 50 797 50 614
str_concat 5 391 5 395 50 1201 50 1034
throw 5 1091 5 1142 50 1419 50 1523

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) 1549700 1323032 205 2579 0 0% 0 0 73.266058
chunky-png (click) 315985 282574 74 1322 1 0% 0 0 37.505743
erubi-rails (click) 1969088 1753502 261 3719 22 0% 0 0 102.38356
hexapdf (click) 1526208 1367465 593 15699 44 0% 0 0 438.945753
liquid-c (click) 555286 437308 114 2228 5 0% 0 0 58.977757
liquid-compile (click) 483816 401945 146 2762 2 0% 0 0 82.384678
liquid-render (click) 652505 591771 131 2946 8 0% 0 0 80.270868
lobsters (click) 8465982 7084205 3099 62497 118 0% 0 0 2113.282221
mail (click) 864005 825910 342 7696 40 0% 0 0 213.309152
psych-load (click) 288207 217079 61 830 2 0% 0 0 24.49347
railsbench (click) 3353805 2931416 1605 19553 47 0% 0 0 554.625054
rubocop (click) 5759612 4915806 3001 56848 125 0% 6 0 1674.302557
ruby-lsp (click) 964227 868182 347 6781 44 0% 1 0 183.618608
sequel (click) 502879 437866 11 119 0 0% 0 0 3.906468
shipit (click) 7600112 6495050 3263 51884 180 0% 0 0 1717.327473
binarytrees (click) 7273 6911 6 64 0 0% 0 0 2.601222
blurhash (click) 52295 51444 27 603 0 0% 0 0 17.730864
erubi (click) 246996 214197 5 125 0 0% 0 0 3.885486
etanni (click) 32930 35718 8 114 0 0% 0 0 3.623581
fannkuchredux (click) 24746 40953 3 399 0 0% 0 0 10.924712
fluentd (click) 490354 458149 7 115 0 0% 0 0 3.804492
graphql (click) 408800 343439 73 1920 19 0% 0 0 53.297676
graphql-native (click) 354685 303393 39 532 0 0% 0 0 13.891927
lee (click) 317215 304389 49 1070 0 0% 0 0 31.009939
matmul (click) 11125 4603 8 132 0 0% 0 0 4.211776
nbody (click) 13890 20235 6 238 0 0% 0 0 5.860409
nqueens (click) 22652 36960 5 387 0 0% 0 0 10.277971
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 110.846815
protoboeuf (click) 170160 177773 12 2836 0 0% 0 0 73.264691
protoboeuf-encode (click) 243046 283791 14 1815 0 0% 0 0 44.913248
rack (click) 280745 257061 35 580 0 0% 0 0 15.204843
ruby-json (click) 19791 17761 8 204 0 0% 0 0 5.585448
rubyboy (click) 702842 628706 154 6864 42 0% 0 0 167.477444
rubykon (click) 146229 162118 137 2070 3 0% 0 0 56.339218
sudoku (click) 52157 66291 7 871 0 0% 0 0 23.154
tinygql (click) 300226 254976 59 1031 5 0% 0 0 27.146356
30k_ifelse (click) 6219958 5057296 9259 75432 0 0% 0 0 1937.516475
30k_methods (click) 2234566 1592952 5778 19357 0 0% 0 0 476.998747
attr_accessor (click) 4372 7952 3 78 0 0% 0 0 2.140034
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.555585
fib (click) 2659 2995 3 30 0 0% 0 0 1.091171
getivar (click) 3812 6802 3 78 0 0% 0 0 1.972988
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.81535
loops-times (click) 6972 8013 5 93 0 0% 0 0 2.806182
object-new (click) 2406 2818 2 36 0 0% 0 0 1.100677
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.148071
ruby-xor (click) 5876 8690 4 100 0 0% 0 0 2.68921
send_bmethod (click) 5238 4968 6 71 0 0% 0 0 1.741041
send_cfunc_block (click) 14669 12471 5 195 0 0% 0 0 4.328562
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.479528
setivar (click) 2783 3726 3 46 0 0% 0 0 1.288271
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.432585
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.721435
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.645698
throw (click) 5953 4624 5 53 0 0% 0 0 1.817777

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.