Ruby Benchmarks

Details for Benchmarks at 2025-09-16 03:46:26 UTC

YJIT metrics from the ruby-bench suite using Ruby 81ddbf3a00.

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 92.4% faster than CRuby 3.5.0dev
  • 6.2% faster than YJIT 3.3.6
On railsbench it is
  • 104.0% faster than CRuby 3.5.0dev
  • 8.2% faster than YJIT 3.3.6
x86_64 runtime: 4 hours, 29 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 83 5 87 50 174 50 226
chunky-png 5 31 5 32 50 14 50 27
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 421 5 382 50 589 50 528
liquid-compile 5 407 5 464 50 552 50 709
liquid-render 5 171 5 160 50 417 50 356
lobsters 5 20 5 20 50 10 50 10
mail 5 195 5 176 50 239 50 219
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 203 50 219
ruby-lsp 5 144 5 144 50 227 50 231
sequel 5 422 5 435 50 594 50 600
shipit 5 10 5 10 50 10 50 10
binarytrees 5 84 5 83 50 147 50 129
blurhash 5 82 5 87 50 127 50 145
erubi 5 115 5 138 50 89 50 137
etanni 5 91 5 70 50 54 50 34
fannkuchredux 5 52 5 57 50 97 50 95
fluentd 5 62 5 62 50 23 50 24
graphql 5 336 5 456 50 456 50 921
graphql-native 5 51 5 79 50 13 50 62
lee 5 23 5 23 50 10 50 10
matmul 5 50 5 54 50 87 50 88
nbody 5 249 5 265 50 579 50 704
nqueens 5 120 5 129 50 74 50 546
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 180 5 181 50 621 50 753
protoboeuf-encode 5 178 5 196 50 326 50 766
rack 5 418 5 437 50 640 50 691
ruby-json 5 83 5 83 50 50 50 50
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 20 5 20 50 10 50 10
sudoku 5 48 5 51 50 162 50 139
tinygql 5 41 5 43 50 41 50 48
30k_ifelse 5 28 5 27 50 214 50 185
30k_methods 5 39 5 39 50 476 50 474
attr_accessor 5 159 5 205 50 1730 50 1921
cfunc_itself 5 338 5 351 50 1137 50 1258
fib 5 127 5 144 50 911 50 933
getivar 5 212 5 317 50 2261 50 2424
keyword_args 5 104 5 105 50 1033 50 1243
loops-times 5 24 5 25 50 48 50 51
object-new 5 319 5 314 50 406 50 481
respond_to 5 132 5 140 50 3253 50 3889
ruby-xor 5 244 5 195 50 795 50 1272
setivar 5 361 5 382 50 3119 50 4962
setivar_object 5 352 5 330 50 671 50 584
setivar_young 5 366 5 333 50 696 50 604
str_concat 5 391 5 445 50 975 50 1121
throw 5 1265 5 1111 50 1738 50 1376

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) 1529656 1292427 203 2570 0 0% 0 0 72.735933
chunky-png (click) 317079 324390 74 1330 1 0% 0 0 38.385646
erubi-rails (click) 1934972 1631088 263 3717 22 0% 0 0 101.499009
hexapdf (click) 1514198 1379122 593 15704 43 0% 0 0 440.799964
liquid-c (click) 541428 469717 114 2230 5 0% 0 0 61.061925
liquid-compile (click) 466418 423984 146 2732 2 0% 0 0 80.182063
liquid-render (click) 647327 502939 131 2946 8 0% 0 0 79.904673
lobsters (click) 8552040 7263007 3119 63544 118 0% 0 0 2161.074024
mail (click) 855940 782492 342 7696 40 0% 0 0 216.036562
psych-load (click) 280258 206633 61 830 2 0% 0 0 24.47438
railsbench (click) 3330479 2805153 1605 19627 47 0% 0 0 554.907676
rubocop (click) 6122176 5384955 3014 63663 156 0% 6 0 1957.100431
ruby-lsp (click) 957359 842882 347 6802 44 0% 1 0 184.459187
sequel (click) 493892 436547 11 119 0 0% 0 0 3.873205
shipit (click) 7748884 6529753 3351 53803 185 0% 1 0 1770.891046
binarytrees (click) 7273 6911 6 64 0 0% 0 0 2.658661
blurhash (click) 52295 51444 27 603 0 0% 0 0 18.20258
erubi (click) 246796 237894 5 125 0 0% 0 0 3.756215
etanni (click) 32930 35718 8 114 0 0% 0 0 3.616531
fannkuchredux (click) 24746 40953 3 399 0 0% 0 0 11.105043
fluentd (click) 466202 420124 7 115 0 0% 0 0 3.711467
graphql (click) 399608 373568 73 1920 19 0% 0 0 54.160806
graphql-native (click) 344777 299547 39 532 0 0% 0 0 14.04336
lee (click) 309924 294873 49 1070 0 0% 0 0 31.560572
matmul (click) 11125 4603 8 132 0 0% 0 0 4.191436
nbody (click) 13890 20235 6 238 0 0% 0 0 5.858273
nqueens (click) 22652 36960 5 387 0 0% 0 0 10.388588
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 111.5586
protoboeuf (click) 170160 177773 12 2836 0 0% 0 0 72.948978
protoboeuf-encode (click) 243046 283791 14 1815 0 0% 0 0 45.116425
rack (click) 276115 250074 35 580 0 0% 0 0 15.079272
ruby-json (click) 19776 17761 8 204 0 0% 0 0 5.641859
rubyboy (click) 685939 584778 154 6860 42 0% 0 0 168.141494
rubykon (click) 146229 162118 137 2070 3 0% 0 0 56.271902
sudoku (click) 52157 66291 7 871 0 0% 0 0 23.690243
tinygql (click) 300807 271170 59 1031 5 0% 0 0 27.290028
30k_ifelse (click) 6219958 5057296 9259 75432 0 0% 0 0 1941.447372
30k_methods (click) 2234566 1592952 5778 19357 0 0% 0 0 480.892695
attr_accessor (click) 4372 7952 3 78 0 0% 0 0 2.093802
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.569814
fib (click) 2659 2995 3 30 0 0% 0 0 1.089902
getivar (click) 3812 6802 3 78 0 0% 0 0 1.908862
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.838477
loops-times (click) 6972 8013 5 93 0 0% 0 0 2.822517
object-new (click) 2406 2818 2 36 0 0% 0 0 1.122093
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.130294
ruby-xor (click) 5876 8690 4 100 0 0% 0 0 2.666643
setivar (click) 2783 3726 3 46 0 0% 0 0 1.291893
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.386323
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.737641
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.414262
throw (click) 5953 4624 5 53 0 0% 0 0 1.769439

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.