Ruby Benchmarks

Details for Benchmarks at 2025-10-13 01:03:18 UTC

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

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
  • 106.4% faster than CRuby 3.5.0dev
  • 1.1% faster than YJIT 3.4.7
x86_64 runtime: 6 hours, 45 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 82 5 86 50 190 50 221
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 421 5 391 50 627 50 543
liquid-compile 5 417 5 469 50 583 50 710
liquid-render 5 170 5 170 50 435 50 381
lobsters 5 20 5 20 50 10 50 10
mail 5 195 5 182 50 252 50 229
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 247 50 245
ruby-lsp 5 142 5 147 50 237 50 242
sequel 5 420 5 414 50 582 50 569
shipit 5 10 5 10 50 10 50 10
binarytrees 5 82 5 79 50 136 50 128
blurhash 5 83 5 88 50 143 50 144
erubi 5 136 5 135 50 136 50 128
etanni 5 98 5 67 50 71 50 30
fannkuchredux 5 55 5 57 50 102 50 99
fluentd 5 56 5 56 50 20 50 26
graphql 5 372 5 447 50 567 50 900
graphql-native 5 57 5 82 50 22 50 63
lee 5 23 5 23 50 10 50 10
matmul 5 51 5 56 50 94 50 90
nbody 5 247 5 294 50 704 50 696
nqueens 5 117 5 126 50 556 50 564
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 180 50 707 50 670
protoboeuf-encode 5 197 5 202 50 835 50 779
rack 5 445 5 441 50 719 50 681
ruby-json 5 82 5 79 50 47 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 155
tinygql 5 41 5 42 50 40 50 46
30k_ifelse 5 28 5 27 50 184 50 182
30k_methods 5 38 5 37 50 474 50 474
attr_accessor 5 157 5 190 50 1826 50 1899
cfunc_itself 5 349 5 356 50 1254 50 1258
fib 5 124 5 143 50 937 50 937
getivar 5 217 5 283 50 2311 50 2393
keyword_args 5 100 5 104 50 1239 50 1242
loops-times 5 23 5 23 50 62 50 57
object-new 5 251 5 346 50 297 50 567
respond_to 5 139 5 137 50 3891 50 3902
ruby-xor 5 236 5 237 50 1310 50 1273
setivar 5 360 5 355 50 4926 50 4931
setivar_object 5 339 5 344 50 748 50 578
setivar_young 5 341 5 344 50 800 50 619
str_concat 5 390 5 406 50 1199 50 1075
throw 5 1089 5 1078 50 1393 50 1541

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 1303335 205 2579 0 0% 0 0 73.843479
chunky-png (click) 317165 291636 74 1322 1 0% 0 0 38.171165
erubi-rails (click) 1974460 1760062 261 3703 22 0% 0 0 102.048215
hexapdf (click) 1525412 1382491 593 15678 44 0% 0 0 441.261639
liquid-c (click) 556884 455309 114 2224 5 0% 0 0 59.692484
liquid-compile (click) 482082 456867 146 2717 2 0% 0 0 80.097034
liquid-render (click) 662975 586862 131 2946 8 0% 0 0 80.654531
lobsters (click) 8450603 7049442 3100 62315 120 0% 0 0 2102.690732
mail (click) 866628 852814 342 7696 40 0% 0 0 213.197773
psych-load (click) 289764 251205 61 830 2 0% 0 0 24.480035
railsbench (click) 3357502 2886611 1605 19561 47 0% 0 0 550.007223
rubocop (click) 5762149 4893855 3001 56863 126 0% 6 0 1677.933276
ruby-lsp (click) 965588 836423 347 6783 44 0% 1 0 183.538872
sequel (click) 495120 461338 11 119 0 0% 0 0 3.995602
shipit (click) 7591705 6419570 3261 51767 180 0% 0 0 1730.66292
binarytrees (click) 7273 6911 6 64 0 0% 0 0 2.642067
blurhash (click) 52295 51444 27 603 0 0% 0 0 17.879052
erubi (click) 248176 223239 5 125 0 0% 0 0 3.832868
etanni (click) 32930 35718 8 114 0 0% 0 0 3.637464
fannkuchredux (click) 24746 40953 3 399 0 0% 0 0 10.88269
fluentd (click) 491941 459359 7 115 0 0% 0 0 3.768802
graphql (click) 410947 362048 73 1920 19 0% 0 0 54.139869
graphql-native (click) 356828 305613 39 532 0 0% 0 0 13.947802
lee (click) 319844 323055 49 1070 0 0% 0 0 31.306158
matmul (click) 11125 4603 8 132 0 0% 0 0 4.22276
nbody (click) 13890 20235 6 238 0 0% 0 0 5.852149
nqueens (click) 22652 36960 5 387 0 0% 0 0 10.287452
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 111.840484
protoboeuf (click) 170160 177773 12 2836 0 0% 0 0 73.13434
protoboeuf-encode (click) 243046 283791 14 1815 0 0% 0 0 45.044088
rack (click) 284278 251263 35 580 0 0% 0 0 14.821673
ruby-json (click) 19791 17761 8 204 0 0% 0 0 5.665805
rubyboy (click) 704489 630443 154 6858 42 0% 0 0 167.986135
rubykon (click) 146229 162118 137 2070 3 0% 0 0 56.088252
sudoku (click) 52157 66291 7 871 0 0% 0 0 23.245163
tinygql (click) 300686 271160 59 1031 5 0% 0 0 27.312176
30k_ifelse (click) 6219958 5057296 9259 75432 0 0% 0 0 1937.94319
30k_methods (click) 2234566 1592952 5778 19357 0 0% 0 0 478.771767
attr_accessor (click) 4372 7952 3 78 0 0% 0 0 2.122424
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.498209
fib (click) 2659 2995 3 30 0 0% 0 0 1.096628
getivar (click) 3812 6802 3 78 0 0% 0 0 1.954635
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.821528
loops-times (click) 6972 8013 5 93 0 0% 0 0 2.789812
object-new (click) 2406 2818 2 36 0 0% 0 0 1.044893
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.106456
ruby-xor (click) 5876 8690 4 100 0 0% 0 0 2.705819
setivar (click) 2783 3726 3 46 0 0% 0 0 1.292912
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.437606
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.752363
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.512316
throw (click) 5953 4624 5 53 0 0% 0 0 1.817702

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.