Ruby Benchmarks

Details for Benchmarks at 2025-09-11 03:47:34 UTC

YJIT metrics from the ruby-bench suite using Ruby 0dc1cd407e.

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 93.4% faster than CRuby 3.5.0dev
  • 7.2% faster than YJIT 3.3.6
On railsbench it is
  • 98.4% faster than CRuby 3.5.0dev
  • 6.6% 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 167 50 212
chunky-png 5 31 5 33 50 15 50 27
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 408 5 383 50 600 50 559
liquid-compile 5 413 5 465 50 543 50 711
liquid-render 5 170 5 168 50 409 50 374
lobsters 5 20 5 20 50 10 50 10
mail 5 195 5 172 50 250 50 224
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 140 5 141 50 201 50 219
ruby-lsp 5 148 5 147 50 244 50 245
sequel 5 425 5 433 50 571 50 596
shipit 5 10 5 10 50 10 50 10
binarytrees 5 84 5 83 50 146 50 130
blurhash 5 81 5 88 50 127 50 145
erubi 5 116 5 137 50 99 50 139
etanni 5 91 5 69 50 53 50 34
fannkuchredux 5 50 5 57 50 98 50 92
fluentd 5 62 5 62 50 24 50 23
graphql 5 338 5 451 50 458 50 923
graphql-native 5 50 5 78 50 14 50 62
lee 5 22 5 23 50 10 50 10
matmul 5 51 5 54 50 88 50 87
nbody 5 249 5 263 50 585 50 704
nqueens 5 120 5 130 50 74 50 544
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 179 5 187 50 621 50 736
protoboeuf-encode 5 175 5 206 50 327 50 789
rack 5 428 5 441 50 647 50 695
ruby-json 5 83 5 83 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 51 50 163 50 141
tinygql 5 41 5 43 50 42 50 49
30k_ifelse 5 28 5 27 50 216 50 186
30k_methods 5 38 5 38 50 482 50 475
attr_accessor 5 157 5 190 50 1722 50 1890
cfunc_itself 5 357 5 347 50 1137 50 1258
fib 5 127 5 143 50 902 50 931
getivar 5 212 5 315 50 2251 50 2402
keyword_args 5 104 5 104 50 1034 50 1243
loops-times 5 24 5 25 50 48 50 57
object-new 5 318 5 311 50 405 50 469
respond_to 5 133 5 139 50 3255 50 3904
ruby-xor 5 245 5 249 50 800 50 1277
setivar 5 361 5 367 50 3186 50 4944
setivar_object 5 353 5 331 50 671 50 629
setivar_young 5 367 5 335 50 699 50 655
str_concat 5 400 5 444 50 979 50 1211
throw 5 1270 5 1114 50 1730 50 1381

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) 1531122 1318111 203 2570 0 0% 0 0 76.55627
chunky-png (click) 316015 274265 74 1322 1 0% 0 0 39.203398
erubi-rails (click) 1939927 1766900 263 3685 22 0% 0 0 102.688573
hexapdf (click) 1504189 1342043 593 15705 43 0% 0 0 459.683305
liquid-c (click) 529969 506711 114 2228 5 0% 0 0 63.410602
liquid-compile (click) 454255 370419 146 2737 2 0% 0 0 81.236584
liquid-render (click) 647821 536155 131 2946 8 0% 0 0 81.769465
lobsters (click) 8560858 7257667 3119 63647 118 0% 0 0 2152.311686
mail (click) 857016 799843 342 7696 40 0% 0 0 219.597628
psych-load (click) 280931 256484 61 830 2 0% 0 0 24.746687
railsbench (click) 3328537 2812629 1605 19557 47 0% 0 0 556.602647
rubocop (click) 6121865 5302982 3014 63667 156 0% 6 0 1853.926633
ruby-lsp (click) 957531 933233 347 6802 44 0% 1 0 190.945289
sequel (click) 486703 443072 11 119 0 0% 0 0 3.966649
shipit (click) 7653712 6280183 3287 52700 184 0% 0 0 1727.827195
binarytrees (click) 7273 6911 6 64 0 0% 0 0 2.597817
blurhash (click) 52295 51444 27 603 0 0% 0 0 18.175475
erubi (click) 248282 198267 5 125 0 0% 0 0 3.813697
etanni (click) 32930 35718 8 114 0 0% 0 0 3.652281
fannkuchredux (click) 24746 40953 3 399 0 0% 0 0 11.144206
fluentd (click) 464199 426719 7 115 0 0% 0 0 3.889931
graphql (click) 390796 371663 73 1920 18 0% 0 0 56.28117
graphql-native (click) 334147 312608 39 532 0 0% 0 0 14.321963
lee (click) 309775 245740 49 1070 0 0% 0 0 31.783529
matmul (click) 11125 4603 8 132 0 0% 0 0 4.205223
nbody (click) 13890 20235 6 238 0 0% 0 0 5.891981
nqueens (click) 22652 36960 5 387 0 0% 0 0 10.411845
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 112.425139
protoboeuf (click) 170160 177773 12 2836 0 0% 0 0 76.998913
protoboeuf-encode (click) 243046 283791 14 1815 0 0% 0 0 46.90824
rack (click) 262978 203398 35 580 0 0% 0 0 15.990875
ruby-json (click) 19776 17761 8 204 0 0% 0 0 5.715484
rubyboy (click) 690349 644581 154 6858 42 0% 0 0 173.921361
rubykon (click) 146229 162118 137 2070 3 0% 0 0 56.865177
sudoku (click) 52157 66291 7 871 0 0% 0 0 24.097094
tinygql (click) 300571 254609 59 1025 5 0% 0 0 27.665427
30k_ifelse (click) 6219958 5057296 9259 75432 0 0% 0 0 1964.948128
30k_methods (click) 2234566 1592952 5778 19357 0 0% 0 0 484.894458
attr_accessor (click) 4372 7952 3 78 0 0% 0 0 2.074467
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.505529
fib (click) 2659 2995 3 30 0 0% 0 0 1.107501
getivar (click) 3812 6802 3 78 0 0% 0 0 1.902481
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.835416
loops-times (click) 6972 8013 5 93 0 0% 0 0 2.738709
object-new (click) 2406 2818 2 36 0 0% 0 0 1.131655
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.140676
ruby-xor (click) 5876 8690 4 100 0 0% 0 0 2.700796
setivar (click) 2783 3726 3 46 0 0% 0 0 1.269807
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.40412
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.702031
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.432058
throw (click) 5953 4624 5 53 0 0% 0 0 1.808563

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.