Ruby Benchmarks

Details for Benchmarks at 2025-10-20 01:03:15 UTC

YJIT metrics from the ruby-bench suite using Ruby 4353187d08.

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
  • 106.2% faster than CRuby 3.5.0dev
  • 6.3% 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 84 5 86 50 195 50 227
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 393 50 626 50 539
liquid-compile 5 406 5 470 50 582 50 707
liquid-render 5 171 5 170 50 438 50 371
lobsters 5 20 5 20 50 10 50 10
mail 5 195 5 166 50 253 50 228
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 249
ruby-lsp 5 142 5 144 50 237 50 241
sequel 5 420 5 424 50 606 50 579
shipit 5 10 5 10 50 10 50 10
binarytrees 5 82 5 78 50 135 50 128
blurhash 5 83 5 87 50 143 50 144
erubi 5 135 5 131 50 136 50 129
etanni 5 97 5 68 50 72 50 30
fannkuchredux 5 54 5 57 50 102 50 104
fluentd 5 61 5 57 50 20 50 28
graphql 5 373 5 450 50 573 50 905
graphql-native 5 57 5 83 50 22 50 63
lee 5 23 5 22 50 10 50 10
matmul 5 51 5 53 50 94 50 92
nbody 5 247 5 267 50 703 50 691
nqueens 5 116 5 128 50 556 50 556
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 177 5 180 50 706 50 683
protoboeuf-encode 5 197 5 191 50 840 50 786
rack 5 440 5 441 50 711 50 681
ruby-json 5 81 5 80 50 46 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 156 50 160
tinygql 5 41 5 43 50 40 50 47
30k_ifelse 5 28 5 27 50 185 50 184
30k_methods 5 38 5 37 50 475 50 466
attr_accessor 5 158 5 197 50 1824 50 1904
cfunc_itself 5 347 5 345 50 1255 50 1258
fib 5 124 5 138 50 937 50 937
getivar 5 215 5 299 50 2311 50 2407
keyword_args 5 100 5 105 50 1240 50 1243
loops-times 5 23 5 23 50 62 50 57
object-new 5 269 5 343 50 298 50 591
respond_to 5 139 5 137 50 3890 50 3896
ruby-xor 5 236 5 248 50 1310 50 1271
setivar 5 360 5 344 50 4924 50 4908
setivar_object 5 339 5 327 50 751 50 545
setivar_young 5 341 5 327 50 799 50 567
str_concat 5 391 5 390 50 1199 50 1074
throw 5 1089 5 1113 50 1415 50 1555

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) 1549994 1331451 205 2579 0 0% 0 0 73.18812
chunky-png (click) 315940 298949 74 1322 1 0% 0 0 37.926805
erubi-rails (click) 1972160 1772564 261 3757 22 0% 0 0 102.22233
hexapdf (click) 1525650 1383445 593 15683 44 0% 0 0 439.412636
liquid-c (click) 555437 486943 114 2228 5 0% 0 0 59.712968
liquid-compile (click) 481391 417422 146 2750 2 0% 0 0 83.425508
liquid-render (click) 661790 536875 131 2946 8 0% 0 0 80.345513
lobsters (click) 8437720 6904037 3102 62227 118 0% 0 0 2116.08079
mail (click) 864005 825910 342 7696 40 0% 0 0 213.713309
psych-load (click) 289648 267724 61 830 2 0% 0 0 24.479445
railsbench (click) 3352514 2889661 1605 19562 47 0% 0 0 587.703894
rubocop (click) 5759682 4923857 3001 56846 125 0% 6 0 1667.643042
ruby-lsp (click) 962785 907584 347 6781 44 0% 1 0 183.45965
sequel (click) 502183 398127 11 119 0 0% 0 0 3.916855
shipit (click) 7942787 6776457 3398 55456 186 0% 1 0 1857.209507
binarytrees (click) 7273 6911 6 64 0 0% 0 0 2.611393
blurhash (click) 52295 51444 27 603 0 0% 0 0 17.712537
erubi (click) 246996 222389 5 125 0 0% 0 0 3.846012
etanni (click) 32930 35718 8 114 0 0% 0 0 3.608716
fannkuchredux (click) 24746 40953 3 399 0 0% 0 0 10.772762
fluentd (click) 490647 450058 7 115 0 0% 0 0 3.728756
graphql (click) 409762 369385 73 1920 19 0% 0 0 54.418711
graphql-native (click) 353873 302916 39 532 0 0% 0 0 14.055434
lee (click) 317215 312581 49 1070 0 0% 0 0 31.370166
matmul (click) 11125 4603 8 132 0 0% 0 0 4.225524
nbody (click) 13890 20235 6 238 0 0% 0 0 5.856769
nqueens (click) 22652 36960 5 387 0 0% 0 0 10.150692
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 111.805945
protoboeuf (click) 170160 177773 12 2836 0 0% 0 0 72.855381
protoboeuf-encode (click) 243046 283791 14 1815 0 0% 0 0 44.299706
rack (click) 280695 265221 35 580 0 0% 0 0 15.01945
ruby-json (click) 19791 17761 8 204 0 0% 0 0 5.615618
rubyboy (click) 703030 637401 154 6860 42 0% 0 0 167.797173
rubykon (click) 145449 177646 137 2062 3 0% 0 0 56.00569
sudoku (click) 52157 66291 7 871 0 0% 0 0 23.162577
tinygql (click) 299501 262113 59 1031 5 0% 0 0 27.290567
30k_ifelse (click) 6219958 5057296 9259 75432 0 0% 0 0 1927.048718
30k_methods (click) 2234566 1592952 5778 19357 0 0% 0 0 481.42662
attr_accessor (click) 4372 7952 3 78 0 0% 0 0 2.125439
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.532901
fib (click) 2659 2995 3 30 0 0% 0 0 1.094081
getivar (click) 3812 6802 3 78 0 0% 0 0 1.928558
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.858478
loops-times (click) 6972 8013 5 93 0 0% 0 0 2.79906
object-new (click) 2406 2818 2 36 0 0% 0 0 1.098304
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.114942
ruby-xor (click) 5876 8690 4 100 0 0% 0 0 2.7178
setivar (click) 2783 3726 3 46 0 0% 0 0 1.265306
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.477172
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.762031
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.487477
throw (click) 5953 4624 5 53 0 0% 0 0 1.819916

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.