Ruby Benchmarks

Details for Benchmarks at 2025-09-25 01:03:56 UTC

YJIT metrics from the ruby-bench suite using Ruby 5e817f98af.

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 91.8% faster than CRuby 3.5.0dev
  • 4.4% faster than YJIT 3.3.6
On railsbench it is
  • 105.0% faster than CRuby 3.5.0dev
  • 4.3% faster than YJIT 3.3.6
x86_64 runtime: 6 hours, 46 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.3.6 warmups CRuby 3.3.6 iters CRuby 3.5.0dev warmups CRuby 3.5.0dev iters YJIT 3.3.6 warmups YJIT 3.3.6 iters YJIT 3.5.0dev warmups YJIT 3.5.0dev iters
activerecord 5 83 5 84 50 168 50 211
chunky-png 5 31 5 32 50 14 50 28
erubi-rails 5 16 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 404 5 391 50 596 50 501
liquid-compile 5 412 5 468 50 547 50 713
liquid-render 5 168 5 165 50 417 50 374
lobsters 5 20 5 20 50 10 50 10
mail 5 189 5 181 50 251 50 209
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 140 5 140 50 208 50 218
ruby-lsp 5 142 5 144 50 233 50 244
sequel 5 430 5 419 50 599 50 577
shipit 5 10 5 10 50 10 50 10
binarytrees 5 84 5 80 50 142 50 125
blurhash 5 82 5 85 50 127 50 145
erubi 5 125 5 141 50 98 50 139
etanni 5 90 5 68 50 53 50 34
fannkuchredux 5 52 5 57 50 97 50 102
fluentd 5 62 5 60 50 23 50 24
graphql 5 332 5 444 50 455 50 910
graphql-native 5 52 5 83 50 13 50 62
lee 5 23 5 22 50 10 50 10
matmul 5 50 5 50 50 87 50 89
nbody 5 249 5 238 50 578 50 700
nqueens 5 120 5 122 50 74 50 555
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 177 50 621 50 667
protoboeuf-encode 5 178 5 205 50 327 50 821
rack 5 426 5 444 50 643 50 692
ruby-json 5 83 5 81 50 50 50 47
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 20 5 21 50 10 50 10
sudoku 5 47 5 51 50 163 50 148
tinygql 5 40 5 42 50 38 50 46
30k_ifelse 5 28 5 27 50 215 50 183
30k_methods 5 39 5 37 50 477 50 473
attr_accessor 5 159 5 204 50 1727 50 1919
cfunc_itself 5 338 5 345 50 1137 50 1258
fib 5 126 5 141 50 910 50 937
getivar 5 212 5 338 50 2261 50 2433
keyword_args 5 103 5 96 50 1033 50 1243
loops-times 5 24 5 24 50 48 50 56
object-new 5 319 5 352 50 404 50 572
respond_to 5 133 5 129 50 3254 50 3899
ruby-xor 5 244 5 246 50 795 50 1273
setivar 5 361 5 394 50 3038 50 4974
setivar_object 5 358 5 360 50 684 50 553
setivar_young 5 367 5 360 50 699 50 564
str_concat 5 392 5 442 50 975 50 1150
throw 5 1265 5 1102 50 1742 50 1507

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) 1536771 1380615 203 2570 0 0% 0 0 78.329082
chunky-png (click) 305866 287773 74 1322 1 0% 0 0 38.227125
erubi-rails (click) 1948178 1660898 263 3755 22 0% 0 0 102.772833
hexapdf (click) 1515155 1358091 593 15727 43 0% 0 0 438.881171
liquid-c (click) 540025 476756 114 2228 5 0% 0 0 60.10722
liquid-compile (click) 466550 416027 146 2748 2 0% 0 0 81.570698
liquid-render (click) 636571 556862 131 2946 8 0% 0 0 79.358863
lobsters (click) 8556456 7020551 3119 63673 118 0% 0 0 2099.738473
mail (click) 856833 832329 342 7696 40 0% 0 0 213.294919
psych-load (click) 282087 241645 61 830 2 0% 0 0 24.400039
railsbench (click) 3330246 2927238 1605 19585 47 0% 0 0 550.619449
rubocop (click) 6125788 5320673 3014 63660 156 0% 6 0 1830.80722
ruby-lsp (click) 961505 895978 347 6802 44 0% 1 0 184.427388
sequel (click) 494880 404738 11 119 0 0% 0 0 3.959165
shipit (click) 7755992 6418511 3350 53897 185 0% 1 0 1755.688635
binarytrees (click) 7273 6911 6 64 0 0% 0 0 2.620934
blurhash (click) 52295 51444 27 603 0 0% 0 0 17.711612
erubi (click) 247501 197658 5 125 0 0% 0 0 3.815261
etanni (click) 32930 35718 8 114 0 0% 0 0 3.60957
fannkuchredux (click) 24746 40953 3 399 0 0% 0 0 10.813233
fluentd (click) 467305 412896 7 115 0 0% 0 0 3.699337
graphql (click) 402307 334877 73 1920 19 0% 0 0 53.705158
graphql-native (click) 346737 285070 39 532 0 0% 0 0 13.843709
lee (click) 309510 278134 49 1070 0 0% 0 0 31.243036
matmul (click) 11125 4603 8 132 0 0% 0 0 4.249136
nbody (click) 13890 20235 6 238 0 0% 0 0 5.882879
nqueens (click) 22652 36960 5 387 0 0% 0 0 10.161464
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 111.678232
protoboeuf (click) 170160 177773 12 2836 0 0% 0 0 73.626024
protoboeuf-encode (click) 243046 283791 14 1815 0 0% 0 0 44.750034
rack (click) 274304 215435 35 580 0 0% 0 0 15.177955
ruby-json (click) 19791 17761 8 204 0 0% 0 0 5.611788
rubyboy (click) 689278 629001 154 6860 42 0% 0 0 167.382239
rubykon (click) 146441 162602 137 2076 3 0% 0 0 56.263416
sudoku (click) 52157 66291 7 871 0 0% 0 0 23.081321
tinygql (click) 300726 254834 59 1031 5 0% 0 0 27.155319
30k_ifelse (click) 6219958 5057296 9259 75432 0 0% 0 0 1938.18002
30k_methods (click) 2234566 1592952 5778 19357 0 0% 0 0 477.561155
attr_accessor (click) 4372 7952 3 78 0 0% 0 0 2.127275
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.520384
fib (click) 2659 2995 3 30 0 0% 0 0 1.1132
getivar (click) 3812 6802 3 78 0 0% 0 0 1.929912
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.827519
loops-times (click) 6972 8013 5 93 0 0% 0 0 2.796097
object-new (click) 2406 2818 2 36 0 0% 0 0 1.094313
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.130153
ruby-xor (click) 5876 8690 4 100 0 0% 0 0 2.706467
setivar (click) 2783 3726 3 46 0 0% 0 0 1.274501
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.460739
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.752718
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.459811
throw (click) 5953 4624 5 53 0 0% 0 0 1.774179

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.