Ruby Benchmarks

Details for Benchmarks at 2025-10-19 01:03:41 UTC

YJIT metrics from the ruby-bench suite using Ruby 56afc0a0ce.

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 89.8% faster than CRuby 3.5.0dev
  • 1.1% slower than YJIT 3.4.7
On railsbench it is
  • 106.2% faster than CRuby 3.5.0dev
  • 2.3% faster than YJIT 3.4.7
x86_64 runtime: 6 hours, 40 minutes
aarch64 runtime: 5 hours, 46 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 84 5 86 50 197 50 215
chunky-png 5 31 5 32 50 33 50 26
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 421 5 385 50 625 50 535
liquid-compile 5 419 5 471 50 583 50 680
liquid-render 5 172 5 167 50 414 50 378
lobsters 5 20 5 20 50 10 50 10
mail 5 195 5 181 50 252 50 225
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 153 5 155 50 246 50 246
ruby-lsp 5 143 5 145 50 225 50 242
sequel 5 425 5 422 50 598 50 584
shipit 5 10 5 10 50 10 50 10
binarytrees 5 82 5 79 50 136 50 127
blurhash 5 83 5 87 50 143 50 144
erubi 5 137 5 132 50 133 50 125
etanni 5 98 5 68 50 72 50 29
fannkuchredux 5 54 5 56 50 102 50 102
fluentd 5 56 5 56 50 20 50 29
graphql 5 372 5 450 50 570 50 898
graphql-native 5 57 5 85 50 22 50 63
lee 5 23 5 23 50 10 50 10
matmul 5 51 5 53 50 94 50 92
nbody 5 247 5 267 50 704 50 688
nqueens 5 116 5 130 50 556 50 554
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 177 50 705 50 685
protoboeuf-encode 5 195 5 184 50 826 50 788
rack 5 437 5 443 50 712 50 675
ruby-json 5 82 5 80 50 50 50 45
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 20 50 10 50 10
sudoku 5 48 5 48 50 156 50 159
tinygql 5 42 5 42 50 40 50 47
30k_ifelse 5 28 5 27 50 184 50 184
30k_methods 5 38 5 37 50 472 50 468
attr_accessor 5 157 5 195 50 1826 50 1907
cfunc_itself 5 350 5 347 50 1254 50 1258
fib 5 124 5 140 50 937 50 937
getivar 5 215 5 299 50 2311 50 2408
keyword_args 5 100 5 105 50 1239 50 1243
loops-times 5 23 5 23 50 62 50 57
object-new 5 268 5 349 50 297 50 584
respond_to 5 139 5 137 50 3889 50 3901
ruby-xor 5 236 5 248 50 1310 50 1269
setivar 5 360 5 349 50 4927 50 4918
setivar_object 5 339 5 324 50 748 50 545
setivar_young 5 341 5 324 50 795 50 567
str_concat 5 390 5 397 50 1199 50 1071
throw 5 1090 5 1108 50 1407 50 1563

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) 1545262 1310677 205 2579 0 0% 0 0 77.824869
chunky-png (click) 315603 290392 74 1322 1 0% 0 0 37.559798
erubi-rails (click) 1967346 1686014 261 3676 22 0% 0 0 99.986521
hexapdf (click) 1525549 1399745 594 15684 44 0% 0 0 442.309343
liquid-c (click) 554975 461551 114 2228 5 0% 0 0 59.867872
liquid-compile (click) 481535 410015 146 2756 2 0% 0 0 82.411522
liquid-render (click) 662013 545273 131 2946 8 0% 0 0 80.745573
lobsters (click) 8462742 7054823 3099 62461 118 0% 0 0 2103.285053
mail (click) 864005 809558 342 7696 40 0% 0 0 213.795628
psych-load (click) 288207 225271 61 830 2 0% 0 0 24.390711
railsbench (click) 3356386 2950008 1605 19624 47 0% 0 0 588.245384
rubocop (click) 5759429 5021626 3001 56837 126 0% 6 0 1776.874652
ruby-lsp (click) 962785 809100 347 6781 44 0% 1 0 182.297052
sequel (click) 501471 413429 11 119 0 0% 0 0 3.958911
shipit (click) 7591859 6386792 3262 51771 180 0% 0 0 1726.624095
binarytrees (click) 7273 6911 6 64 0 0% 0 0 2.592914
blurhash (click) 52295 51444 27 603 0 0% 0 0 17.588586
erubi (click) 247869 221543 5 125 0 0% 0 0 3.81645
etanni (click) 32930 35718 8 114 0 0% 0 0 3.618392
fannkuchredux (click) 24746 40953 3 399 0 0% 0 0 10.844566
fluentd (click) 490354 466272 7 115 0 0% 0 0 3.8113
graphql (click) 409762 361193 73 1920 19 0% 0 0 53.751975
graphql-native (click) 353159 293621 39 532 0 0% 0 0 14.067334
lee (click) 317215 312581 49 1070 0 0% 0 0 31.2775
matmul (click) 11125 4603 8 132 0 0% 0 0 4.203406
nbody (click) 13890 20235 6 238 0 0% 0 0 5.850111
nqueens (click) 22652 36960 5 387 0 0% 0 0 10.15193
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 111.331089
protoboeuf (click) 170160 177773 12 2836 0 0% 0 0 73.001056
protoboeuf-encode (click) 243046 283791 14 1815 0 0% 0 0 44.558281
rack (click) 280745 257061 35 580 0 0% 0 0 15.314672
ruby-json (click) 19791 17761 8 204 0 0% 0 0 5.592932
rubyboy (click) 703030 637401 154 6860 42 0% 0 0 167.248798
rubykon (click) 145449 177646 137 2062 3 0% 0 0 56.031546
sudoku (click) 52157 66291 7 871 0 0% 0 0 23.155844
tinygql (click) 300226 263168 59 1031 5 0% 0 0 27.293099
30k_ifelse (click) 6219958 5057296 9259 75432 0 0% 0 0 1937.644252
30k_methods (click) 2234566 1592952 5778 19357 0 0% 0 0 477.091759
attr_accessor (click) 4372 7952 3 78 0 0% 0 0 2.113773
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.50825
fib (click) 2659 2995 3 30 0 0% 0 0 1.12771
getivar (click) 3812 6802 3 78 0 0% 0 0 1.962446
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.851978
loops-times (click) 6972 8013 5 93 0 0% 0 0 2.828661
object-new (click) 2406 2818 2 36 0 0% 0 0 1.058219
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.124632
ruby-xor (click) 5876 8690 4 100 0 0% 0 0 2.697452
setivar (click) 2783 3726 3 46 0 0% 0 0 1.291014
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.479977
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.769552
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.505011
throw (click) 5953 4624 5 53 0 0% 0 0 1.823544

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.