Ruby Benchmarks

Details for Benchmarks at 2025-09-09 03:47:48 UTC

YJIT metrics from the ruby-bench suite using Ruby 27d9c67bfc.

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 93.4% faster than CRuby 3.5.0dev
  • 7.8% faster than YJIT 3.3.6
On railsbench it is
  • 106.7% faster than CRuby 3.5.0dev
  • 6.7% 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 84 5 86 50 168 50 215
chunky-png 5 31 5 33 50 15 50 28
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 420 5 390 50 598 50 566
liquid-compile 5 408 5 470 50 541 50 715
liquid-render 5 169 5 171 50 408 50 387
lobsters 5 20 5 20 50 10 50 10
mail 5 188 5 184 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 139 5 141 50 211 50 217
ruby-lsp 5 143 5 147 50 224 50 242
sequel 5 431 5 431 50 597 50 597
shipit 5 10 5 10 50 10 50 10
binarytrees 5 84 5 83 50 146 50 130
blurhash 5 82 5 86 50 127 50 145
erubi 5 116 5 142 50 99 50 140
etanni 5 90 5 70 50 53 50 36
fannkuchredux 5 51 5 57 50 98 50 94
fluentd 5 62 5 63 50 25 50 24
graphql 5 339 5 452 50 485 50 936
graphql-native 5 51 5 80 50 14 50 63
lee 5 23 5 23 50 10 50 10
matmul 5 51 5 52 50 88 50 85
nbody 5 249 5 255 50 585 50 702
nqueens 5 120 5 130 50 74 50 544
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 178 5 189 50 621 50 758
protoboeuf-encode 5 173 5 203 50 326 50 771
rack 5 421 5 439 50 647 50 695
ruby-json 5 83 5 84 50 49 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 163 50 140
tinygql 5 41 5 43 50 39 50 48
30k_ifelse 5 28 5 27 50 215 50 185
30k_methods 5 38 5 38 50 481 50 475
attr_accessor 5 157 5 214 50 1720 50 1931
cfunc_itself 5 357 5 359 50 1147 50 1258
fib 5 127 5 145 50 902 50 931
getivar 5 212 5 346 50 2251 50 2431
keyword_args 5 104 5 106 50 1042 50 1243
loops-times 5 23 5 25 50 48 50 57
object-new 5 318 5 313 50 405 50 482
respond_to 5 134 5 138 50 3257 50 3898
ruby-xor 5 245 5 257 50 800 50 1278
setivar 5 361 5 360 50 3187 50 4936
setivar_object 5 355 5 326 50 670 50 629
setivar_young 5 367 5 329 50 703 50 662
str_concat 5 398 5 462 50 979 50 1209
throw 5 1272 5 1132 50 1742 50 1390

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) 1537103 1364462 203 2570 0 0% 0 0 75.965459
chunky-png (click) 317486 275500 74 1322 1 0% 0 0 39.480384
erubi-rails (click) 1941461 1662160 262 3705 22 0% 0 0 103.222749
hexapdf (click) 1511168 1325295 594 15682 42 0% 0 0 454.357466
liquid-c (click) 541984 470236 114 2228 5 0% 0 0 61.746806
liquid-compile (click) 466156 406945 146 2708 2 0% 0 0 80.837737
liquid-render (click) 648038 577228 131 2946 8 0% 0 0 82.085716
lobsters (click) 8513091 7291345 3118 63143 118 0% 0 0 2119.59148
mail (click) 856971 832582 342 7696 40 0% 0 0 218.413587
psych-load (click) 281292 273127 61 830 2 0% 0 0 24.731797
railsbench (click) 3334174 2957192 1605 19643 47 0% 0 0 566.409057
rubocop (click) 6121767 5302424 3014 63655 156 0% 6 0 1858.074232
ruby-lsp (click) 960680 862468 346 6774 43 0% 1 0 190.126469
sequel (click) 495017 412996 11 119 0 0% 0 0 3.998303
shipit (click) 7754904 6391867 3348 53840 185 0% 1 0 1772.782397
binarytrees (click) 7273 6911 6 64 0 0% 0 0 2.668153
blurhash (click) 52295 51444 27 603 0 0% 0 0 18.293002
erubi (click) 247830 214261 5 125 0 0% 0 0 3.838323
etanni (click) 32930 35718 8 114 0 0% 0 0 3.68854
fannkuchredux (click) 24746 40953 3 399 0 0% 0 0 11.189255
fluentd (click) 466450 403995 7 115 0 0% 0 0 3.923024
graphql (click) 402744 384344 73 1920 19 0% 0 0 56.040203
graphql-native (click) 345806 300485 39 532 0 0% 0 0 14.379297
lee (click) 310958 271240 49 1070 0 0% 0 0 31.73637
matmul (click) 11125 4603 8 132 0 0% 0 0 4.250151
nbody (click) 13890 20235 6 238 0 0% 0 0 5.894635
nqueens (click) 22652 36960 5 387 0 0% 0 0 10.467889
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 112.66778
protoboeuf (click) 170160 177773 12 2836 0 0% 0 0 76.279595
protoboeuf-encode (click) 243046 283791 14 1815 0 0% 0 0 47.047806
rack (click) 274633 223927 35 580 0 0% 0 0 15.614007
ruby-json (click) 19776 17761 8 204 0 0% 0 0 5.706739
rubyboy (click) 688899 628128 154 6862 42 0% 0 0 175.041727
rubykon (click) 146229 162118 137 2070 3 0% 0 0 57.053901
sudoku (click) 52157 66291 7 871 0 0% 0 0 24.02047
tinygql (click) 301055 263285 59 1031 5 0% 0 0 27.557233
30k_ifelse (click) 6219958 5057296 9259 75432 0 0% 0 0 1961.146643
30k_methods (click) 2234566 1592952 5778 19357 0 0% 0 0 488.687242
attr_accessor (click) 4372 7952 3 78 0 0% 0 0 2.090189
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.476653
fib (click) 2659 2995 3 30 0 0% 0 0 1.135353
getivar (click) 3812 6802 3 78 0 0% 0 0 1.914324
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.798658
loops-times (click) 6972 8013 5 93 0 0% 0 0 2.752582
object-new (click) 2406 2818 2 36 0 0% 0 0 1.090887
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.147473
ruby-xor (click) 5876 8690 4 100 0 0% 0 0 2.747404
setivar (click) 2783 3726 3 46 0 0% 0 0 1.267655
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.420852
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.720669
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.483332
throw (click) 5953 4624 5 53 0 0% 0 0 1.833792

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.