Ruby Benchmarks

Details for Benchmarks at 2025-09-08 03:49:35 UTC

YJIT metrics from the ruby-bench suite using Ruby 1e7ee6a4ba.

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 92.8% faster than CRuby 3.5.0dev
  • 7.4% faster than YJIT 3.3.6
On railsbench it is
  • 102.7% faster than CRuby 3.5.0dev
  • 7.4% faster than YJIT 3.3.6
x86_64 runtime: 4 hours, 28 minutes
aarch64 runtime: 3 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.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 85 5 85 50 178 50 214
chunky-png 5 31 5 33 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 406 5 395 50 572 50 540
liquid-compile 5 408 5 468 50 551 50 708
liquid-render 5 170 5 169 50 414 50 363
lobsters 5 20 5 20 50 10 50 10
mail 5 195 5 180 50 250 50 230
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 137 5 142 50 202 50 219
ruby-lsp 5 141 5 147 50 227 50 246
sequel 5 435 5 434 50 598 50 603
shipit 5 10 5 10 50 10 50 10
binarytrees 5 84 5 83 50 146 50 131
blurhash 5 82 5 87 50 127 50 145
erubi 5 125 5 138 50 100 50 139
etanni 5 90 5 69 50 53 50 34
fannkuchredux 5 52 5 52 50 97 50 86
fluentd 5 62 5 63 50 25 50 28
graphql 5 343 5 451 50 455 50 921
graphql-native 5 51 5 80 50 16 50 62
lee 5 23 5 23 50 10 50 10
matmul 5 51 5 51 50 88 50 78
nbody 5 248 5 268 50 585 50 703
nqueens 5 120 5 125 50 74 50 541
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 178 5 183 50 621 50 755
protoboeuf-encode 5 177 5 203 50 327 50 765
rack 5 425 5 443 50 647 50 702
ruby-json 5 83 5 84 50 50 50 52
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 48 50 163 50 139
tinygql 5 41 5 43 50 42 50 47
30k_ifelse 5 28 5 28 50 217 50 187
30k_methods 5 39 5 39 50 480 50 476
attr_accessor 5 157 5 173 50 1719 50 1864
cfunc_itself 5 358 5 360 50 1137 50 1258
fib 5 127 5 145 50 902 50 931
getivar 5 212 5 322 50 2248 50 2410
keyword_args 5 104 5 103 50 1034 50 1243
loops-times 5 24 5 26 50 48 50 56
object-new 5 320 5 311 50 405 50 476
respond_to 5 134 5 137 50 3255 50 3896
ruby-xor 5 245 5 236 50 799 50 1277
setivar 5 361 5 380 50 3191 50 4961
setivar_object 5 352 5 326 50 671 50 586
setivar_young 5 367 5 329 50 703 50 606
str_concat 5 397 5 457 50 978 50 1209
throw 5 1272 5 1125 50 1727 50 1396

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) 1534157 1337635 203 2570 0 0% 0 0 74.076708
chunky-png (click) 307990 305358 74 1322 1 0% 0 0 38.126588
erubi-rails (click) 1936218 1659088 262 3707 22 0% 0 0 104.213983
hexapdf (click) 1514506 1401700 593 15684 43 0% 0 0 454.167631
liquid-c (click) 529634 473578 114 2228 5 0% 0 0 61.768116
liquid-compile (click) 465466 381668 146 2717 2 0% 0 0 83.213081
liquid-render (click) 650086 612183 131 2946 8 0% 0 0 81.453138
lobsters (click) 8545333 7274571 3118 63546 118 0% 0 0 2144.066835
mail (click) 857016 857187 342 7696 40 0% 0 0 219.875126
psych-load (click) 282769 258245 61 830 2 0% 0 0 24.561073
railsbench (click) 3331815 2864754 1605 19586 47 0% 0 0 557.566883
rubocop (click) 6121573 5384166 3014 63655 156 0% 6 0 1850.537594
ruby-lsp (click) 961387 871460 346 6774 43 0% 1 0 186.233255
sequel (click) 494954 429214 11 119 0 0% 0 0 3.981845
shipit (click) 7648893 6342689 3289 52593 184 0% 0 0 1713.788016
binarytrees (click) 7273 6911 6 64 0 0% 0 0 2.66338
blurhash (click) 52295 51444 27 603 0 0% 0 0 18.118082
erubi (click) 247049 221802 5 125 0 0% 0 0 3.899424
etanni (click) 32930 35718 8 114 0 0% 0 0 3.65873
fannkuchredux (click) 24746 40953 3 399 0 0% 0 0 11.132782
fluentd (click) 465712 419711 7 115 0 0% 0 0 3.803804
graphql (click) 402722 359737 73 1920 19 0% 0 0 55.692671
graphql-native (click) 345056 258795 39 532 0 0% 0 0 14.314376
lee (click) 309879 253884 49 1070 0 0% 0 0 32.046744
matmul (click) 11125 4603 8 132 0 0% 0 0 4.179301
nbody (click) 13890 20235 6 238 0 0% 0 0 5.814161
nqueens (click) 22652 36960 5 387 0 0% 0 0 10.489236
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 112.459726
protoboeuf (click) 170160 177773 12 2836 0 0% 0 0 76.609871
protoboeuf-encode (click) 243046 283791 14 1815 0 0% 0 0 46.388362
rack (click) 274385 256376 35 580 0 0% 0 0 15.086109
ruby-json (click) 19776 17761 8 204 0 0% 0 0 5.721685
rubyboy (click) 677127 607531 154 6860 42 0% 0 0 173.633854
rubykon (click) 146229 162118 137 2070 3 0% 0 0 56.767168
sudoku (click) 52157 66291 7 871 0 0% 0 0 23.965684
tinygql (click) 289107 258844 59 1031 5 0% 0 0 27.590915
30k_ifelse (click) 6219958 5057296 9259 75432 0 0% 0 0 1953.877988
30k_methods (click) 2234566 1592952 5778 19357 0 0% 0 0 483.604424
attr_accessor (click) 4372 7952 3 78 0 0% 0 0 2.074887
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.499771
fib (click) 2659 2995 3 30 0 0% 0 0 1.101944
getivar (click) 3812 6802 3 78 0 0% 0 0 1.891226
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.785552
loops-times (click) 6972 8013 5 93 0 0% 0 0 2.779207
object-new (click) 2406 2818 2 36 0 0% 0 0 1.071198
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.182577
ruby-xor (click) 5876 8690 4 100 0 0% 0 0 2.670286
setivar (click) 2783 3726 3 46 0 0% 0 0 1.253316
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.39704
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.690935
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.446322
throw (click) 5953 4624 5 53 0 0% 0 0 1.801427

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.