Ruby Benchmarks

Details for Benchmarks at 2025-09-29 01:03:57 UTC

YJIT metrics from the ruby-bench suite using Ruby 14c234ae73.

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 91.3% faster than CRuby 3.5.0dev
  • 5.1% faster than YJIT 3.3.6
On railsbench it is
  • 105.8% faster than CRuby 3.5.0dev
  • 4.0% faster than YJIT 3.3.6
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.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 87 50 182 50 223
chunky-png 5 31 5 32 50 14 50 29
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 421 5 406 50 599 50 540
liquid-compile 5 412 5 465 50 558 50 695
liquid-render 5 174 5 170 50 415 50 375
lobsters 5 20 5 20 50 10 50 10
mail 5 195 5 182 50 251 50 224
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 138 5 142 50 214 50 216
ruby-lsp 5 143 5 146 50 229 50 240
sequel 5 420 5 431 50 580 50 601
shipit 5 10 5 10 50 10 50 10
binarytrees 5 84 5 80 50 142 50 128
blurhash 5 82 5 87 50 127 50 145
erubi 5 115 5 132 50 99 50 128
etanni 5 90 5 67 50 53 50 33
fannkuchredux 5 52 5 57 50 98 50 103
fluentd 5 62 5 62 50 23 50 31
graphql 5 334 5 462 50 462 50 922
graphql-native 5 52 5 81 50 13 50 60
lee 5 22 5 22 50 10 50 10
matmul 5 50 5 51 50 87 50 90
nbody 5 248 5 242 50 579 50 700
nqueens 5 120 5 130 50 73 50 553
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 173 5 183 50 621 50 755
protoboeuf-encode 5 175 5 197 50 325 50 771
rack 5 422 5 442 50 638 50 701
ruby-json 5 84 5 84 50 50 50 51
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 20 5 21 50 10 50 10
sudoku 5 48 5 52 50 162 50 151
tinygql 5 41 5 42 50 41 50 49
30k_ifelse 5 28 5 27 50 214 50 184
30k_methods 5 38 5 37 50 480 50 475
attr_accessor 5 159 5 196 50 1725 50 1900
cfunc_itself 5 337 5 355 50 1137 50 1258
fib 5 126 5 141 50 909 50 938
getivar 5 212 5 362 50 2260 50 2449
keyword_args 5 103 5 106 50 1033 50 1243
loops-times 5 24 5 24 50 47 50 56
object-new 5 320 5 307 50 405 50 474
respond_to 5 133 5 132 50 3255 50 3903
ruby-xor 5 244 5 244 50 797 50 1267
setivar 5 361 5 395 50 3107 50 4975
setivar_object 5 358 5 332 50 684 50 577
setivar_young 5 367 5 335 50 697 50 591
str_concat 5 394 5 446 50 979 50 1143
throw 5 1267 5 1079 50 1742 50 1405

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) 1533612 1312766 205 2577 0 0% 0 0 73.285454
chunky-png (click) 317160 324413 74 1322 1 0% 0 0 38.034113
erubi-rails (click) 1933203 1676844 261 3689 22 0% 0 0 101.245346
hexapdf (click) 1513144 1278002 594 15684 43 0% 0 0 440.684211
liquid-c (click) 542679 471052 114 2228 5 0% 0 0 59.883828
liquid-compile (click) 465323 423419 146 2732 2 0% 0 0 81.598285
liquid-render (click) 647345 519314 131 2946 8 0% 0 0 81.153084
lobsters (click) 8554627 7262123 3121 63558 118 0% 0 0 2101.801227
mail (click) 856838 815974 342 7696 40 0% 0 0 212.96396
psych-load (click) 280892 248783 61 830 2 0% 0 0 23.883351
railsbench (click) 3328338 2842038 1605 19583 47 0% 0 0 552.777349
rubocop (click) 6120963 5334455 3014 63655 156 0% 6 0 1859.076796
ruby-lsp (click) 961505 879734 347 6802 44 0% 1 0 184.375705
sequel (click) 494880 429282 11 119 0 0% 0 0 3.822415
shipit (click) 7731663 6553667 3346 53636 183 0% 1 0 1714.871228
binarytrees (click) 7273 6911 6 64 0 0% 0 0 2.652492
blurhash (click) 52295 51444 27 603 0 0% 0 0 17.686911
erubi (click) 246436 221330 5 125 0 0% 0 0 3.810676
etanni (click) 32930 35718 8 114 0 0% 0 0 3.606894
fannkuchredux (click) 24746 40953 3 399 0 0% 0 0 10.826867
fluentd (click) 465529 411328 7 115 0 0% 0 0 3.730639
graphql (click) 391008 355519 73 1920 18 0% 0 0 54.459915
graphql-native (click) 346737 285070 39 532 0 0% 0 0 14.110206
lee (click) 310629 287322 49 1070 0 0% 0 0 31.586252
matmul (click) 11125 4603 8 132 0 0% 0 0 4.202844
nbody (click) 13890 20235 6 238 0 0% 0 0 5.870979
nqueens (click) 22652 36960 5 387 0 0% 0 0 10.216314
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 111.903604
protoboeuf (click) 170160 177773 12 2836 0 0% 0 0 73.413568
protoboeuf-encode (click) 243046 283791 14 1815 0 0% 0 0 44.826022
rack (click) 274011 256160 35 580 0 0% 0 0 15.107486
ruby-json (click) 19791 17761 8 204 0 0% 0 0 5.66945
rubyboy (click) 678281 609056 154 6860 42 0% 0 0 169.237159
rubykon (click) 146229 162118 137 2070 3 0% 0 0 56.518366
sudoku (click) 52157 66291 7 871 0 0% 0 0 23.157545
tinygql (click) 299074 253447 59 1031 5 0% 0 0 27.005759
30k_ifelse (click) 6219958 5057296 9259 75432 0 0% 0 0 1942.721339
30k_methods (click) 2234566 1592952 5778 19357 0 0% 0 0 481.694998
attr_accessor (click) 4372 7952 3 78 0 0% 0 0 2.119891
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.51669
fib (click) 2659 2995 3 30 0 0% 0 0 1.089395
getivar (click) 3812 6802 3 78 0 0% 0 0 1.954544
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.840116
loops-times (click) 6972 8013 5 93 0 0% 0 0 2.803445
object-new (click) 2406 2818 2 36 0 0% 0 0 1.078782
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.12464
ruby-xor (click) 5876 8690 4 100 0 0% 0 0 2.721812
setivar (click) 2783 3726 3 46 0 0% 0 0 1.27774
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.438011
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.74642
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.463338
throw (click) 5953 4624 5 53 0 0% 0 0 1.810762

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.