Ruby Benchmarks

Details for Benchmarks at 2025-10-01 01:04:16 UTC

YJIT metrics from the ruby-bench suite using Ruby 3eda2493ef.

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 92.4% faster than CRuby 3.5.0dev
  • 6.0% faster than YJIT 3.3.6
On railsbench it is
  • 110.3% faster than CRuby 3.5.0dev
  • 6.3% faster than YJIT 3.3.6
x86_64 runtime: 6 hours, 44 minutes
aarch64 runtime: 5 hours, 49 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 82 5 87 50 183 50 221
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 410 5 392 50 571 50 536
liquid-compile 5 406 5 467 50 553 50 679
liquid-render 5 169 5 170 50 414 50 376
lobsters 5 20 5 20 50 10 50 10
mail 5 195 5 167 50 237 50 229
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 141 5 142 50 202 50 220
ruby-lsp 5 144 5 144 50 219 50 241
sequel 5 423 5 419 50 579 50 577
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 144
erubi 5 125 5 137 50 99 50 137
etanni 5 90 5 67 50 53 50 33
fannkuchredux 5 52 5 57 50 98 50 102
fluentd 5 62 5 64 50 24 50 29
graphql 5 334 5 457 50 463 50 913
graphql-native 5 51 5 81 50 14 50 60
lee 5 22 5 23 50 10 50 10
matmul 5 50 5 50 50 87 50 91
nbody 5 248 5 242 50 579 50 702
nqueens 5 120 5 130 50 73 50 555
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 172 5 179 50 621 50 645
protoboeuf-encode 5 178 5 206 50 327 50 784
rack 5 419 5 446 50 641 50 690
ruby-json 5 83 5 82 50 50 50 47
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 20 5 21 50 10 50 10
sudoku 5 48 5 51 50 162 50 149
tinygql 5 40 5 43 50 39 50 48
30k_ifelse 5 28 5 27 50 215 50 184
30k_methods 5 39 5 37 50 481 50 469
attr_accessor 5 159 5 211 50 1727 50 1928
cfunc_itself 5 338 5 350 50 1137 50 1257
fib 5 126 5 140 50 910 50 938
getivar 5 212 5 342 50 2254 50 2440
keyword_args 5 103 5 107 50 1033 50 1240
loops-times 5 24 5 24 50 48 50 57
object-new 5 318 5 348 50 405 50 588
respond_to 5 133 5 138 50 3253 50 3901
ruby-xor 5 244 5 249 50 795 50 1266
setivar 5 361 5 393 50 3108 50 4972
setivar_object 5 358 5 360 50 685 50 549
setivar_young 5 367 5 361 50 699 50 583
str_concat 5 392 5 447 50 971 50 1138
throw 5 1262 5 1153 50 1728 50 1531

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) 1538540 1284191 205 2577 0 0% 0 0 74.480767
chunky-png (click) 317160 267089 74 1322 1 0% 0 0 37.832515
erubi-rails (click) 1936128 1719415 261 3710 22 0% 0 0 101.356632
hexapdf (click) 1513457 1400817 594 15682 43 0% 0 0 443.594548
liquid-c (click) 541110 444994 114 2228 5 0% 0 0 59.915921
liquid-compile (click) 461197 402016 146 2681 2 0% 0 0 79.836879
liquid-render (click) 647571 519609 131 2946 8 0% 0 0 80.702391
lobsters (click) 8553036 7142708 3120 63641 118 0% 0 0 2103.817448
mail (click) 856833 791401 342 7696 40 0% 0 0 213.971489
psych-load (click) 282087 241645 61 830 2 0% 0 0 24.533746
railsbench (click) 3323401 2819151 1605 19556 47 0% 0 0 558.739825
rubocop (click) 6123081 5287208 3014 63663 156 0% 6 0 1864.568238
ruby-lsp (click) 956528 857951 347 6802 44 0% 1 0 185.31616
sequel (click) 494880 404738 11 119 0 0% 0 0 3.893735
shipit (click) 7728190 6492709 3346 53638 183 0% 1 0 1706.197541
binarytrees (click) 7273 6911 6 64 0 0% 0 0 2.621701
blurhash (click) 52295 51444 27 603 0 0% 0 0 18.048368
erubi (click) 247501 197658 5 125 0 0% 0 0 3.817213
etanni (click) 32930 35718 8 114 0 0% 0 0 3.62876
fannkuchredux (click) 24746 40953 3 399 0 0% 0 0 10.792505
fluentd (click) 467305 404784 7 115 0 0% 0 0 3.756349
graphql (click) 402302 343069 73 1920 19 0% 0 0 54.614637
graphql-native (click) 344585 291418 39 532 0 0% 0 0 14.083607
lee (click) 308326 268906 49 1070 0 0% 0 0 31.475498
matmul (click) 11125 4603 8 132 0 0% 0 0 4.252527
nbody (click) 13890 20235 6 238 0 0% 0 0 5.860713
nqueens (click) 22652 36960 5 387 0 0% 0 0 10.105892
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 113.751508
protoboeuf (click) 170160 177773 12 2836 0 0% 0 0 73.573964
protoboeuf-encode (click) 243046 283791 14 1815 0 0% 0 0 45.163075
rack (click) 274304 215435 35 580 0 0% 0 0 15.272609
ruby-json (click) 19791 17761 8 204 0 0% 0 0 5.634348
rubyboy (click) 689364 604518 154 6862 42 0% 0 0 168.968287
rubykon (click) 145449 177646 137 2062 3 0% 0 0 56.341591
sudoku (click) 52157 66291 7 871 0 0% 0 0 23.336846
tinygql (click) 300726 230258 59 1031 5 0% 0 0 27.660553
30k_ifelse (click) 6219958 5057296 9259 75432 0 0% 0 0 1945.209345
30k_methods (click) 2234566 1592952 5778 19357 0 0% 0 0 480.541592
attr_accessor (click) 4372 7952 3 78 0 0% 0 0 2.153511
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.547701
fib (click) 2659 2995 3 30 0 0% 0 0 1.119857
getivar (click) 3812 6802 3 78 0 0% 0 0 1.944396
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.84713
loops-times (click) 6972 8013 5 93 0 0% 0 0 2.818903
object-new (click) 2406 2818 2 36 0 0% 0 0 1.097963
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.18252
ruby-xor (click) 5876 8690 4 100 0 0% 0 0 2.747673
setivar (click) 2783 3726 3 46 0 0% 0 0 1.313176
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.447879
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.755113
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.520359
throw (click) 5953 4624 5 53 0 0% 0 0 1.808522

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.