Ruby Benchmarks

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

YJIT metrics from the ruby-bench suite using Ruby 07b59eee6a.

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 91.1% faster than CRuby 3.5.0dev
  • the same speed as YJIT 3.4.7
On railsbench it is
  • 103.4% 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 222
chunky-png 5 31 5 32 50 33 50 27
erubi-rails 5 15 5 14 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 420 5 399 50 625 50 527
liquid-compile 5 418 5 471 50 545 50 715
liquid-render 5 172 5 169 50 434 50 374
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 181 50 251 50 226
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 152 5 158 50 247 50 247
ruby-lsp 5 146 5 146 50 228 50 245
sequel 5 420 5 422 50 584 50 572
shipit 5 10 5 10 50 10 50 10
binarytrees 5 82 5 80 50 136 50 128
blurhash 5 83 5 87 50 143 50 143
erubi 5 135 5 135 50 136 50 127
etanni 5 98 5 66 50 71 50 31
fannkuchredux 5 54 5 58 50 101 50 99
fluentd 5 56 5 55 50 29 50 26
graphql 5 358 5 457 50 571 50 908
graphql-native 5 58 5 83 50 22 50 63
lee 5 23 5 23 50 10 50 10
matmul 5 51 5 56 50 94 50 89
nbody 5 246 5 294 50 704 50 637
nqueens 5 116 5 125 50 556 50 563
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 177 5 179 50 706 50 647
protoboeuf-encode 5 197 5 202 50 823 50 782
rack 5 440 5 441 50 712 50 673
ruby-json 5 81 5 80 50 47 50 46
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 155
tinygql 5 41 5 42 50 34 50 46
30k_ifelse 5 28 5 27 50 186 50 184
30k_methods 5 38 5 37 50 474 50 475
attr_accessor 5 157 5 200 50 1825 50 1911
cfunc_itself 5 348 5 341 50 1255 50 1258
fib 5 124 5 137 50 937 50 936
getivar 5 217 5 283 50 2310 50 2394
keyword_args 5 100 5 102 50 1240 50 1242
loops-times 5 23 5 23 50 62 50 57
object-new 5 269 5 351 50 297 50 576
respond_to 5 139 5 137 50 3882 50 3898
ruby-xor 5 236 5 235 50 1310 50 1271
setivar 5 360 5 355 50 4923 50 4929
setivar_object 5 339 5 345 50 746 50 575
setivar_young 5 341 5 345 50 798 50 616
str_concat 5 390 5 402 50 1202 50 1021
throw 5 1089 5 1138 50 1414 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 1278667 205 2579 0 0% 0 0 73.37274
chunky-png (click) 317561 251449 74 1322 1 0% 0 0 38.001505
erubi-rails (click) 1978021 1723403 261 3728 22 0% 0 0 101.645558
hexapdf (click) 1526502 1376264 593 15693 44 0% 0 0 440.61834
liquid-c (click) 556658 463226 114 2228 5 0% 0 0 59.840396
liquid-compile (click) 480465 440772 146 2717 2 0% 0 0 80.784038
liquid-render (click) 652248 599291 131 2946 8 0% 0 0 81.245685
lobsters (click) 8452084 7112914 3099 62308 118 0% 0 0 2171.944856
mail (click) 864906 818340 342 7696 40 0% 0 0 212.181957
psych-load (click) 282035 266754 61 830 2 0% 0 0 23.983548
railsbench (click) 3355590 2972606 1605 19608 47 0% 0 0 552.944883
rubocop (click) 5762111 4925572 3001 56843 125 0% 6 0 1778.810455
ruby-lsp (click) 963960 891815 346 6755 43 0% 1 0 182.385713
sequel (click) 503707 456671 11 119 0 0% 0 0 3.86443
shipit (click) 7730127 6511065 3345 53570 181 0% 1 0 1844.380709
binarytrees (click) 7273 6911 6 64 0 0% 0 0 2.643753
blurhash (click) 52295 51444 27 603 0 0% 0 0 17.873356
erubi (click) 248176 231431 5 125 0 0% 0 0 3.813045
etanni (click) 32930 35718 8 114 0 0% 0 0 3.641364
fannkuchredux (click) 24746 40953 3 399 0 0% 0 0 10.881886
fluentd (click) 491044 425749 7 115 0 0% 0 0 3.800841
graphql (click) 410947 353856 73 1920 19 0% 0 0 53.934662
graphql-native (click) 355391 295899 39 532 0 0% 0 0 13.98377
lee (click) 319844 323055 49 1070 0 0% 0 0 31.326173
matmul (click) 11125 4603 8 132 0 0% 0 0 4.253022
nbody (click) 13890 20235 6 238 0 0% 0 0 5.919926
nqueens (click) 22652 36960 5 387 0 0% 0 0 10.318647
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 110.767176
protoboeuf (click) 170160 177773 12 2836 0 0% 0 0 72.594883
protoboeuf-encode (click) 243046 283791 14 1815 0 0% 0 0 44.688289
rack (click) 282593 258689 35 580 0 0% 0 0 15.305939
ruby-json (click) 19791 17761 8 204 0 0% 0 0 5.669051
rubyboy (click) 705033 639253 154 6864 42 0% 0 0 168.437548
rubykon (click) 146229 162118 137 2070 3 0% 0 0 56.295563
sudoku (click) 52157 66291 7 871 0 0% 0 0 23.281394
tinygql (click) 301406 272210 59 1031 5 0% 0 0 27.301046
30k_ifelse (click) 6219958 5057296 9259 75432 0 0% 0 0 1934.032219
30k_methods (click) 2234566 1592952 5778 19357 0 0% 0 0 479.227081
attr_accessor (click) 4372 7952 3 78 0 0% 0 0 2.112198
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.541847
fib (click) 2659 2995 3 30 0 0% 0 0 1.099763
getivar (click) 3812 6802 3 78 0 0% 0 0 1.973456
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.824916
loops-times (click) 6972 8013 5 93 0 0% 0 0 2.802768
object-new (click) 2406 2818 2 36 0 0% 0 0 1.039327
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.156767
ruby-xor (click) 5876 8690 4 100 0 0% 0 0 2.698153
setivar (click) 2783 3726 3 46 0 0% 0 0 1.285859
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.427139
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.760877
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.490707
throw (click) 5953 4624 5 53 0 0% 0 0 1.803034

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.