Ruby Benchmarks

Details for Benchmarks at 2025-09-24 01:03:59 UTC

YJIT metrics from the ruby-bench suite using Ruby 479cdab337.

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 92.9% faster than CRuby 3.5.0dev
  • 3.7% faster than YJIT 3.3.6
On railsbench it is
  • 103.2% faster than CRuby 3.5.0dev
  • 2.7% faster than YJIT 3.3.6
x86_64 runtime: 6 hours, 46 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 84 5 83 50 181 50 225
chunky-png 5 31 5 32 50 14 50 29
erubi-rails 5 16 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 411 5 395 50 595 50 500
liquid-compile 5 412 5 459 50 548 50 691
liquid-render 5 170 5 165 50 416 50 371
lobsters 5 20 5 20 50 10 50 10
mail 5 195 5 168 50 251 50 209
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 140 5 139 50 213 50 216
ruby-lsp 5 143 5 146 50 234 50 244
sequel 5 415 5 418 50 597 50 579
shipit 5 10 5 10 50 10 50 10
binarytrees 5 84 5 78 50 142 50 124
blurhash 5 82 5 84 50 127 50 145
erubi 5 126 5 140 50 87 50 137
etanni 5 91 5 68 50 54 50 33
fannkuchredux 5 52 5 56 50 97 50 100
fluentd 5 62 5 59 50 24 50 27
graphql 5 339 5 448 50 448 50 909
graphql-native 5 50 5 81 50 14 50 62
lee 5 22 5 21 50 10 50 10
matmul 5 50 5 49 50 87 50 88
nbody 5 248 5 240 50 578 50 699
nqueens 5 120 5 128 50 74 50 556
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 173 5 177 50 620 50 659
protoboeuf-encode 5 178 5 202 50 326 50 809
rack 5 419 5 445 50 642 50 685
ruby-json 5 83 5 82 50 50 50 46
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 52 50 163 50 150
tinygql 5 41 5 43 50 37 50 46
30k_ifelse 5 28 5 27 50 214 50 182
30k_methods 5 38 5 37 50 476 50 474
attr_accessor 5 159 5 203 50 1726 50 1920
cfunc_itself 5 338 5 345 50 1136 50 1258
fib 5 126 5 141 50 907 50 937
getivar 5 211 5 338 50 2252 50 2436
keyword_args 5 103 5 96 50 1030 50 1242
loops-times 5 24 5 24 50 47 50 57
object-new 5 318 5 351 50 406 50 570
respond_to 5 132 5 129 50 3254 50 3896
ruby-xor 5 244 5 246 50 796 50 1274
setivar 5 360 5 394 50 3078 50 4973
setivar_object 5 358 5 360 50 683 50 552
setivar_young 5 367 5 359 50 698 50 564
str_concat 5 394 5 442 50 978 50 1146
throw 5 1269 5 1102 50 1736 50 1513

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) 1536771 1364164 203 2570 0 0% 0 0 77.969175
chunky-png (click) 317160 267089 74 1322 1 0% 0 0 37.7946
erubi-rails (click) 1937066 1615785 263 3661 22 0% 0 0 99.428484
hexapdf (click) 1514606 1336123 593 15686 43 0% 0 0 444.209205
liquid-c (click) 541073 428559 114 2228 5 0% 0 0 60.181238
liquid-compile (click) 469521 417505 146 2748 2 0% 0 0 82.632753
liquid-render (click) 647345 519314 131 2946 8 0% 0 0 80.35193
lobsters (click) 8523343 7061466 3119 63311 120 0% 0 0 2167.030494
mail (click) 857510 824918 342 7706 40 0% 0 0 213.653584
psych-load (click) 282087 241645 61 830 2 0% 0 0 23.86689
railsbench (click) 3332476 2930120 1605 19558 47 0% 0 0 550.397002
rubocop (click) 6122348 5310950 3014 63658 157 0% 6 0 1848.404897
ruby-lsp (click) 961505 920514 347 6802 44 0% 1 0 184.305121
sequel (click) 494880 429282 11 119 0 0% 0 0 3.800731
shipit (click) 7631080 6399310 3270 52404 184 0% 0 0 1660.71149
binarytrees (click) 7273 6911 6 64 0 0% 0 0 2.638729
blurhash (click) 52295 51444 27 603 0 0% 0 0 17.599811
erubi (click) 247501 197658 5 125 0 0% 0 0 3.827425
etanni (click) 32930 35718 8 114 0 0% 0 0 3.610881
fannkuchredux (click) 24746 40953 3 399 0 0% 0 0 10.796225
fluentd (click) 467305 421120 7 115 0 0% 0 0 3.742914
graphql (click) 402307 343069 73 1920 19 0% 0 0 53.90876
graphql-native (click) 346737 285070 39 532 0 0% 0 0 13.972154
lee (click) 310638 287327 49 1070 0 0% 0 0 31.225875
matmul (click) 11125 4603 8 132 0 0% 0 0 4.251709
nbody (click) 13890 20235 6 238 0 0% 0 0 5.871414
nqueens (click) 22652 36960 5 387 0 0% 0 0 10.139506
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 111.193357
protoboeuf (click) 170160 177773 12 2836 0 0% 0 0 72.53683
protoboeuf-encode (click) 243046 283791 14 1815 0 0% 0 0 44.51254
rack (click) 274304 215467 35 580 0 0% 0 0 15.357591
ruby-json (click) 19791 17761 8 204 0 0% 0 0 5.582396
rubyboy (click) 691516 629914 154 6860 42 0% 0 0 167.934051
rubykon (click) 146441 162602 137 2076 3 0% 0 0 56.741302
sudoku (click) 52157 66291 7 871 0 0% 0 0 23.050807
tinygql (click) 300197 254341 59 1025 5 0% 0 0 27.526176
30k_ifelse (click) 6219958 5057296 9259 75432 0 0% 0 0 1932.255643
30k_methods (click) 2234566 1592952 5778 19357 0 0% 0 0 482.07489
attr_accessor (click) 4372 7952 3 78 0 0% 0 0 2.131762
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.51664
fib (click) 2659 2995 3 30 0 0% 0 0 1.135005
getivar (click) 3812 6802 3 78 0 0% 0 0 1.958195
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.837746
loops-times (click) 6972 8013 5 93 0 0% 0 0 2.747173
object-new (click) 2406 2818 2 36 0 0% 0 0 1.136141
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.13307
ruby-xor (click) 5876 8690 4 100 0 0% 0 0 2.703342
setivar (click) 2783 3726 3 46 0 0% 0 0 1.262693
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.447347
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.769539
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.453187
throw (click) 5953 4624 5 53 0 0% 0 0 1.840347

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.