Ruby Benchmarks

Details for Benchmarks at 2025-10-14 01:02:58 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 91.7% 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
  • 1.8% faster than YJIT 3.4.7
x86_64 runtime: 6 hours, 44 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.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 216
chunky-png 5 31 5 32 50 33 50 26
erubi-rails 5 15 5 14 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 424 5 394 50 625 50 543
liquid-compile 5 417 5 462 50 545 50 707
liquid-render 5 172 5 167 50 414 50 378
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 182 50 253 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 157 50 246 50 246
ruby-lsp 5 142 5 148 50 236 50 244
sequel 5 422 5 419 50 584 50 571
shipit 5 10 5 10 50 10 50 10
binarytrees 5 82 5 79 50 136 50 128
blurhash 5 83 5 87 50 143 50 144
erubi 5 138 5 134 50 131 50 130
etanni 5 98 5 66 50 72 50 30
fannkuchredux 5 54 5 58 50 101 50 101
fluentd 5 56 5 56 50 20 50 25
graphql 5 373 5 450 50 571 50 904
graphql-native 5 58 5 84 50 22 50 64
lee 5 23 5 23 50 10 50 10
matmul 5 51 5 56 50 94 50 90
nbody 5 246 5 292 50 704 50 697
nqueens 5 114 5 126 50 556 50 563
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 182 50 706 50 671
protoboeuf-encode 5 197 5 202 50 839 50 773
rack 5 435 5 447 50 711 50 676
ruby-json 5 84 5 80 50 50 50 45
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 50 50 157 50 156
tinygql 5 41 5 43 50 36 50 45
30k_ifelse 5 28 5 27 50 184 50 183
30k_methods 5 38 5 37 50 474 50 470
attr_accessor 5 158 5 192 50 1825 50 1902
cfunc_itself 5 349 5 353 50 1255 50 1258
fib 5 123 5 141 50 938 50 937
getivar 5 215 5 281 50 2313 50 2391
keyword_args 5 100 5 103 50 1240 50 1243
loops-times 5 23 5 23 50 62 50 57
object-new 5 268 5 347 50 296 50 577
respond_to 5 139 5 137 50 3888 50 3905
ruby-xor 5 238 5 237 50 1310 50 1272
setivar 5 360 5 354 50 4926 50 4931
setivar_object 5 339 5 343 50 751 50 576
setivar_young 5 341 5 344 50 797 50 613
str_concat 5 390 5 403 50 1199 50 1016
throw 5 1087 5 1082 50 1407 50 1533

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) 1552103 1406239 205 2579 0 0% 0 0 78.679822
chunky-png (click) 317835 309021 74 1322 1 0% 0 0 37.888516
erubi-rails (click) 1976228 1729138 261 3750 22 0% 0 0 103.105356
hexapdf (click) 1524120 1348883 593 15676 44 0% 0 0 442.400087
liquid-c (click) 556884 463501 114 2228 5 0% 0 0 60.047232
liquid-compile (click) 479009 398239 146 2701 2 0% 0 0 80.026676
liquid-render (click) 662259 585774 131 2946 8 0% 0 0 80.683893
lobsters (click) 8461202 7051595 3099 62390 118 0% 0 0 2110.890285
mail (click) 865194 818565 342 7696 40 0% 0 0 216.286127
psych-load (click) 289764 251205 61 830 2 0% 0 0 24.441646
railsbench (click) 3354934 2973062 1605 19551 47 0% 0 0 590.254479
rubocop (click) 5768249 4941688 3001 56923 125 0% 6 0 1683.643992
ruby-lsp (click) 964152 908485 347 6783 44 0% 1 0 185.140076
sequel (click) 501418 446098 11 119 0 0% 0 0 3.781303
shipit (click) 7595985 6271279 3263 51802 180 0% 0 0 1719.16053
binarytrees (click) 7273 6911 6 64 0 0% 0 0 2.641757
blurhash (click) 52295 51444 27 603 0 0% 0 0 17.830998
erubi (click) 248176 231431 5 125 0 0% 0 0 3.872037
etanni (click) 32930 35718 8 114 0 0% 0 0 3.642652
fannkuchredux (click) 24746 40953 3 399 0 0% 0 0 10.936499
fluentd (click) 490079 441290 7 115 0 0% 0 0 3.772813
graphql (click) 410954 353856 73 1920 19 0% 0 0 54.383962
graphql-native (click) 354676 311200 39 532 0 0% 0 0 14.032833
lee (click) 319844 323055 49 1070 0 0% 0 0 31.685648
matmul (click) 11125 4603 8 132 0 0% 0 0 4.322267
nbody (click) 13890 20235 6 238 0 0% 0 0 5.93745
nqueens (click) 22652 36960 5 387 0 0% 0 0 10.290411
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 112.279199
protoboeuf (click) 170160 177773 12 2836 0 0% 0 0 73.384933
protoboeuf-encode (click) 243046 283791 14 1815 0 0% 0 0 45.309318
rack (click) 283374 267515 35 580 0 0% 0 0 15.299672
ruby-json (click) 19791 17761 8 204 0 0% 0 0 5.611718
rubyboy (click) 704633 630641 154 6860 42 0% 0 0 169.412555
rubykon (click) 146229 162118 137 2070 3 0% 0 0 57.147211
sudoku (click) 52157 66291 7 871 0 0% 0 0 23.506197
tinygql (click) 301401 272210 59 1031 5 0% 0 0 27.682194
30k_ifelse (click) 6219958 5057296 9259 75432 0 0% 0 0 1944.809273
30k_methods (click) 2234566 1592952 5778 19357 0 0% 0 0 484.183748
attr_accessor (click) 4372 7952 3 78 0 0% 0 0 2.139882
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.536461
fib (click) 2659 2995 3 30 0 0% 0 0 1.11478
getivar (click) 3812 6802 3 78 0 0% 0 0 1.968161
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.832235
loops-times (click) 6972 8013 5 93 0 0% 0 0 2.832227
object-new (click) 2406 2818 2 36 0 0% 0 0 1.092754
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.153922
ruby-xor (click) 5876 8690 4 100 0 0% 0 0 2.741261
setivar (click) 2783 3726 3 46 0 0% 0 0 1.291173
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.431899
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.766083
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.50964
throw (click) 5953 4624 5 53 0 0% 0 0 1.835236

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.