Ruby Benchmarks

Details for Benchmarks at 2025-09-07 03:47:29 UTC

YJIT metrics from the ruby-bench suite using Ruby 953e1ef992.

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 92.1% faster than CRuby 3.5.0dev
  • 6.3% faster than YJIT 3.3.6
On railsbench it is
  • 104.6% faster than CRuby 3.5.0dev
  • 6.8% 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 85 5 86 50 180 50 215
chunky-png 5 31 5 33 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 421 5 391 50 601 50 525
liquid-compile 5 408 5 471 50 550 50 677
liquid-render 5 170 5 162 50 406 50 385
lobsters 5 20 5 20 50 10 50 10
mail 5 190 5 182 50 250 50 228
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 138 5 141 50 202 50 219
ruby-lsp 5 141 5 148 50 247 50 246
sequel 5 433 5 434 50 578 50 602
shipit 5 10 5 10 50 10 50 10
binarytrees 5 84 5 83 50 146 50 131
blurhash 5 82 5 87 50 127 50 145
erubi 5 127 5 141 50 87 50 134
etanni 5 91 5 70 50 53 50 35
fannkuchredux 5 52 5 52 50 97 50 86
fluentd 5 62 5 59 50 25 50 24
graphql 5 341 5 458 50 467 50 928
graphql-native 5 51 5 80 50 13 50 62
lee 5 23 5 23 50 10 50 10
matmul 5 51 5 51 50 88 50 78
nbody 5 249 5 267 50 585 50 703
nqueens 5 120 5 125 50 74 50 541
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 180 5 183 50 621 50 754
protoboeuf-encode 5 179 5 199 50 327 50 767
rack 5 420 5 436 50 603 50 693
ruby-json 5 83 5 84 50 50 50 52
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 20 5 21 50 10 50 10
sudoku 5 48 5 47 50 163 50 139
tinygql 5 40 5 43 50 39 50 48
30k_ifelse 5 28 5 28 50 216 50 185
30k_methods 5 39 5 38 50 475 50 472
attr_accessor 5 157 5 173 50 1718 50 1858
cfunc_itself 5 357 5 361 50 1147 50 1258
fib 5 127 5 144 50 903 50 931
getivar 5 212 5 323 50 2248 50 2412
keyword_args 5 104 5 103 50 1042 50 1243
loops-times 5 24 5 26 50 48 50 56
object-new 5 318 5 313 50 404 50 476
respond_to 5 133 5 139 50 3256 50 3895
ruby-xor 5 245 5 240 50 799 50 1276
setivar 5 361 5 380 50 3190 50 4960
setivar_object 5 352 5 327 50 671 50 586
setivar_young 5 367 5 327 50 703 50 603
str_concat 5 400 5 458 50 977 50 1209
throw 5 1269 5 1124 50 1726 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) 1536409 1371993 203 2570 0 0% 0 0 73.758992
chunky-png (click) 305836 287773 74 1322 1 0% 0 0 37.977277
erubi-rails (click) 1942878 1663675 262 3712 22 0% 0 0 103.135005
hexapdf (click) 1515460 1353615 594 15690 43 0% 0 0 452.418072
liquid-c (click) 541325 461416 114 2228 5 0% 0 0 61.600817
liquid-compile (click) 462988 420000 146 2697 2 0% 0 0 80.503157
liquid-render (click) 648351 520248 131 2946 8 0% 0 0 81.466042
lobsters (click) 8564749 7303555 3119 63693 118 0% 0 0 2138.111623
mail (click) 855432 782348 342 7696 40 0% 0 0 219.030255
psych-load (click) 273602 215625 61 830 2 0% 0 0 25.4462
railsbench (click) 3332481 2987427 1605 19648 47 0% 0 0 560.527696
rubocop (click) 6122155 5327325 3014 63660 156 0% 6 0 1875.330141
ruby-lsp (click) 961680 854390 347 6802 44 0% 1 0 190.630847
sequel (click) 495245 454106 11 119 0 0% 0 0 4.158664
shipit (click) 7647923 6258914 3290 52604 184 0% 0 0 1712.767385
binarytrees (click) 7273 6911 6 64 0 0% 0 0 2.614271
blurhash (click) 52295 51444 27 603 0 0% 0 0 18.074829
erubi (click) 235882 217988 5 125 0 0% 0 0 3.930418
etanni (click) 32930 35718 8 114 0 0% 0 0 3.676587
fannkuchredux (click) 24746 40953 3 399 0 0% 0 0 11.118655
fluentd (click) 466786 420666 7 115 0 0% 0 0 3.867296
graphql (click) 402784 335221 73 1920 19 0% 0 0 55.352812
graphql-native (click) 346130 276166 39 532 0 0% 0 0 14.272058
lee (click) 311003 246693 49 1070 0 0% 0 0 32.110853
matmul (click) 11125 4603 8 132 0 0% 0 0 4.207834
nbody (click) 13890 20235 6 238 0 0% 0 0 5.794975
nqueens (click) 22652 36960 5 387 0 0% 0 0 10.457071
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 111.64949
protoboeuf (click) 170160 177773 12 2836 0 0% 0 0 76.311681
protoboeuf-encode (click) 243046 283791 14 1815 0 0% 0 0 46.335318
rack (click) 274678 223924 35 580 0 0% 0 0 15.307886
ruby-json (click) 19776 17761 8 204 0 0% 0 0 5.733692
rubyboy (click) 677122 615723 154 6860 42 0% 0 0 173.700636
rubykon (click) 146229 162118 137 2070 3 0% 0 0 56.805852
sudoku (click) 52157 66291 7 871 0 0% 0 0 23.954455
tinygql (click) 301100 246910 59 1031 5 0% 0 0 27.50364
30k_ifelse (click) 6219958 5057296 9259 75432 0 0% 0 0 1953.693366
30k_methods (click) 2234566 1592952 5778 19357 0 0% 0 0 484.332287
attr_accessor (click) 4372 7952 3 78 0 0% 0 0 2.052907
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.446437
fib (click) 2659 2995 3 30 0 0% 0 0 1.101143
getivar (click) 3812 6802 3 78 0 0% 0 0 1.934097
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.794629
loops-times (click) 6972 8013 5 93 0 0% 0 0 2.736898
object-new (click) 2406 2818 2 36 0 0% 0 0 1.081641
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.125015
ruby-xor (click) 5876 8690 4 100 0 0% 0 0 2.690374
setivar (click) 2783 3726 3 46 0 0% 0 0 1.252406
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.41357
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.668306
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.454643
throw (click) 5953 4624 5 53 0 0% 0 0 1.834237

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.