Ruby Benchmarks

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

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

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 91.9% faster than CRuby 3.5.0dev
  • the same speed as YJIT 3.4.7
On railsbench it is
  • 102.4% faster than CRuby 3.5.0dev
  • 3.8% faster than YJIT 3.4.7
x86_64 runtime: 6 hours, 41 minutes
aarch64 runtime: 5 hours, 48 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 196 50 221
chunky-png 5 31 5 32 50 32 50 26
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 421 5 395 50 626 50 532
liquid-compile 5 417 5 456 50 581 50 695
liquid-render 5 167 5 166 50 437 50 365
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 180 50 252 50 226
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 247 50 245
ruby-lsp 5 144 5 147 50 240 50 242
sequel 5 421 5 421 50 605 50 572
shipit 5 10 5 10 50 10 50 10
binarytrees 5 82 5 77 50 136 50 127
blurhash 5 83 5 87 50 143 50 144
erubi 5 136 5 133 50 137 50 127
etanni 5 97 5 66 50 72 50 31
fannkuchredux 5 55 5 56 50 102 50 102
fluentd 5 56 5 56 50 20 50 23
graphql 5 375 5 453 50 570 50 928
graphql-native 5 58 5 83 50 22 50 64
lee 5 23 5 22 50 10 50 10
matmul 5 51 5 55 50 94 50 90
nbody 5 246 5 283 50 704 50 695
nqueens 5 116 5 127 50 556 50 564
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 172 5 172 50 706 50 655
protoboeuf-encode 5 197 5 199 50 838 50 779
rack 5 441 5 437 50 722 50 677
ruby-json 5 84 5 79 50 50 50 45
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 154
tinygql 5 41 5 42 50 40 50 46
30k_ifelse 5 28 5 27 50 185 50 150
30k_methods 5 38 5 36 50 475 50 472
attr_accessor 5 157 5 198 50 1825 50 1911
cfunc_itself 5 350 5 343 50 1255 50 1258
fib 5 124 5 137 50 937 50 937
getivar 5 217 5 332 50 2313 50 2435
keyword_args 5 100 5 100 50 1240 50 1243
loops-times 5 23 5 25 50 62 50 57
object-new 5 268 5 352 50 298 50 580
respond_to 5 139 5 136 50 3885 50 3899
ruby-xor 5 236 5 249 50 1309 50 1272
setivar 5 360 5 357 50 4927 50 4935
setivar_object 5 339 5 343 50 746 50 578
setivar_young 5 341 5 343 50 797 50 613
str_concat 5 390 5 399 50 1191 50 1020
throw 5 1088 5 1075 50 1412 50 1558

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) 1546379 1262351 205 2579 0 0% 0 0 73.350444
chunky-png (click) 317165 258868 74 1322 1 0% 0 0 37.330619
erubi-rails (click) 1966684 1775694 262 3672 22 0% 0 0 100.557428
hexapdf (click) 1527942 1336378 593 15680 44 0% 0 0 438.907073
liquid-c (click) 556192 511604 114 2228 5 0% 0 0 60.227479
liquid-compile (click) 478037 421314 146 2702 2 0% 0 0 80.610083
liquid-render (click) 663021 578719 131 2946 8 0% 0 0 80.391656
lobsters (click) 8442384 7172362 3098 62229 118 0% 0 0 2208.208965
mail (click) 858233 828777 342 7696 40 0% 0 0 214.056191
psych-load (click) 288424 224784 61 830 2 0% 0 0 23.979836
railsbench (click) 3352839 2831882 1605 19540 47 0% 0 0 550.433947
rubocop (click) 5757670 5020034 3001 56833 125 0% 6 0 1670.929807
ruby-lsp (click) 964152 933061 347 6783 44 0% 1 0 183.005678
sequel (click) 494827 452830 11 119 0 0% 0 0 3.959162
shipit (click) 7558314 6461001 3263 51829 180 0% 0 0 1717.071917
binarytrees (click) 7273 6911 6 64 0 0% 0 0 2.62293
blurhash (click) 52295 51444 27 603 0 0% 0 0 17.676883
erubi (click) 248176 239623 5 125 0 0% 0 0 3.829783
etanni (click) 32930 35718 8 114 0 0% 0 0 3.628981
fannkuchredux (click) 24746 40953 3 399 0 0% 0 0 10.886394
fluentd (click) 484562 434601 7 115 0 0% 0 0 3.769894
graphql (click) 410947 353856 73 1920 19 0% 0 0 53.761573
graphql-native (click) 354339 319067 39 532 0 0% 0 0 13.842179
lee (click) 310157 279385 49 1070 0 0% 0 0 31.262875
matmul (click) 11125 4603 8 132 0 0% 0 0 4.253977
nbody (click) 13890 20235 6 238 0 0% 0 0 5.879628
nqueens (click) 22652 36960 5 387 0 0% 0 0 10.266417
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 111.093851
protoboeuf (click) 170160 177773 12 2836 0 0% 0 0 73.175252
protoboeuf-encode (click) 243046 283791 14 1815 0 0% 0 0 44.70689
rack (click) 279034 246643 35 580 0 0% 0 0 15.332796
ruby-json (click) 19791 17761 8 204 0 0% 0 0 5.62553
rubyboy (click) 704114 654551 154 6858 42 0% 0 0 167.744607
rubykon (click) 146229 162118 137 2070 3 0% 0 0 56.668611
sudoku (click) 52157 66291 7 871 0 0% 0 0 23.300684
tinygql (click) 293163 270932 59 1031 5 0% 0 0 27.166008
30k_ifelse (click) 6219958 5057296 9259 75432 0 0% 0 0 1930.870899
30k_methods (click) 2234566 1592952 5778 19357 0 0% 0 0 477.532692
attr_accessor (click) 4372 7952 3 78 0 0% 0 0 2.136781
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.560772
fib (click) 2659 2995 3 30 0 0% 0 0 1.135258
getivar (click) 3812 6802 3 78 0 0% 0 0 1.979212
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.843699
loops-times (click) 6972 8013 5 93 0 0% 0 0 2.797595
object-new (click) 2406 2818 2 36 0 0% 0 0 1.086141
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.138321
ruby-xor (click) 5876 8690 4 100 0 0% 0 0 2.737341
setivar (click) 2783 3726 3 46 0 0% 0 0 1.297014
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.454075
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.751732
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.491888
throw (click) 5953 4624 5 53 0 0% 0 0 1.817218

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.