Ruby Benchmarks

Details for Benchmarks at 2025-10-16 01:03:06 UTC

YJIT metrics from the ruby-bench suite using Ruby 9e4a756963.

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 94.6% faster than CRuby 3.5.0dev
  • the same speed as YJIT 3.4.7
On railsbench it is
  • 104.7% faster than CRuby 3.5.0dev
  • the same speed as 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 83 5 85 50 191 50 224
chunky-png 5 31 5 31 50 33 50 27
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 420 5 385 50 626 50 538
liquid-compile 5 418 5 466 50 546 50 710
liquid-render 5 171 5 161 50 432 50 379
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 178 50 253 50 227
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 156 50 248 50 244
ruby-lsp 5 144 5 146 50 235 50 243
sequel 5 429 5 426 50 584 50 586
shipit 5 10 5 10 50 10 50 10
binarytrees 5 82 5 78 50 136 50 127
blurhash 5 83 5 88 50 143 50 143
erubi 5 136 5 132 50 135 50 127
etanni 5 98 5 65 50 72 50 29
fannkuchredux 5 54 5 57 50 102 50 101
fluentd 5 56 5 56 50 20 50 24
graphql 5 371 5 447 50 573 50 927
graphql-native 5 57 5 81 50 22 50 60
lee 5 23 5 22 50 10 50 10
matmul 5 51 5 55 50 94 50 90
nbody 5 247 5 285 50 704 50 696
nqueens 5 116 5 128 50 556 50 563
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 175 50 707 50 666
protoboeuf-encode 5 198 5 190 50 840 50 783
rack 5 436 5 436 50 714 50 677
ruby-json 5 84 5 79 50 50 50 46
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 41 5 41 50 39 50 48
30k_ifelse 5 28 5 27 50 184 50 184
30k_methods 5 38 5 37 50 476 50 473
attr_accessor 5 158 5 198 50 1821 50 1909
cfunc_itself 5 349 5 344 50 1255 50 1258
fib 5 123 5 137 50 937 50 937
getivar 5 217 5 345 50 2314 50 2443
keyword_args 5 100 5 99 50 1240 50 1242
loops-times 5 23 5 25 50 62 50 57
object-new 5 268 5 348 50 298 50 589
respond_to 5 139 5 136 50 3891 50 3894
ruby-xor 5 236 5 254 50 1310 50 1270
setivar 5 360 5 355 50 4925 50 4929
setivar_object 5 339 5 327 50 746 50 546
setivar_young 5 341 5 327 50 797 50 565
str_concat 5 391 5 400 50 1199 50 1074
throw 5 1086 5 1087 50 1415 50 1527

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 1323284 205 2579 0 0% 0 0 73.270622
chunky-png (click) 315415 282030 74 1322 1 0% 0 0 37.841365
erubi-rails (click) 1975305 1852280 261 3757 22 0% 0 0 102.038822
hexapdf (click) 1527987 1394272 594 15710 44 0% 0 0 437.396447
liquid-c (click) 555462 453778 114 2228 5 0% 0 0 60.478923
liquid-compile (click) 481327 409403 146 2747 2 0% 0 0 81.23384
liquid-render (click) 661413 609865 131 2946 8 0% 0 0 80.009645
lobsters (click) 8462803 7057257 3099 62403 118 0% 0 0 2091.984398
mail (click) 863303 841122 342 7699 40 0% 0 0 213.616916
psych-load (click) 287244 264894 61 830 2 0% 0 0 24.034492
railsbench (click) 3356692 2976261 1605 19580 47 0% 0 0 553.924386
rubocop (click) 5759288 4907132 3001 56842 125 0% 6 0 1664.621901
ruby-lsp (click) 964222 859798 347 6781 44 0% 1 0 182.519946
sequel (click) 501494 429813 11 119 0 0% 0 0 3.790018
shipit (click) 7597496 6371697 3262 51800 180 0% 0 0 1706.869723
binarytrees (click) 7273 6911 6 64 0 0% 0 0 2.56528
blurhash (click) 52295 51444 27 603 0 0% 0 0 17.755503
erubi (click) 246996 222389 5 125 0 0% 0 0 3.857552
etanni (click) 32930 35718 8 114 0 0% 0 0 3.584807
fannkuchredux (click) 24746 40953 3 399 0 0% 0 0 10.904104
fluentd (click) 489995 441355 7 115 0 0% 0 0 3.737375
graphql (click) 409469 369069 73 1920 19 0% 0 0 54.492315
graphql-native (click) 354213 303241 39 532 0 0% 0 0 13.90842
lee (click) 317215 312581 49 1070 0 0% 0 0 31.307518
matmul (click) 11125 4603 8 132 0 0% 0 0 4.175923
nbody (click) 13890 20235 6 238 0 0% 0 0 5.880895
nqueens (click) 22652 36960 5 387 0 0% 0 0 10.191498
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 111.253741
protoboeuf (click) 170160 177773 12 2836 0 0% 0 0 72.583601
protoboeuf-encode (click) 243046 283791 14 1815 0 0% 0 0 44.864407
rack (click) 280452 273149 35 580 0 0% 0 0 15.269711
ruby-json (click) 19791 17761 8 204 0 0% 0 0 5.712089
rubyboy (click) 702239 587141 154 6860 42 0% 0 0 167.998305
rubykon (click) 145449 177646 137 2062 3 0% 0 0 56.579515
sudoku (click) 52157 66291 7 871 0 0% 0 0 23.192171
tinygql (click) 299933 254680 59 1031 5 0% 0 0 27.057864
30k_ifelse (click) 6219958 5057296 9259 75432 0 0% 0 0 1924.363421
30k_methods (click) 2234566 1592952 5778 19357 0 0% 0 0 473.781511
attr_accessor (click) 4372 7952 3 78 0 0% 0 0 2.117458
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.486945
fib (click) 2659 2995 3 30 0 0% 0 0 1.12835
getivar (click) 3812 6802 3 78 0 0% 0 0 1.970265
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.841022
loops-times (click) 6972 8013 5 93 0 0% 0 0 2.801808
object-new (click) 2406 2818 2 36 0 0% 0 0 1.084789
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.13463
ruby-xor (click) 5876 8690 4 100 0 0% 0 0 2.701151
setivar (click) 2783 3726 3 46 0 0% 0 0 1.281771
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.46224
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.776384
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.523357
throw (click) 5953 4624 5 53 0 0% 0 0 1.814898

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.