Ruby Benchmarks

Details for Benchmarks at 2025-10-31 00:38:51 UTC

YJIT metrics from the ruby-bench suite using Ruby 17e95cb471.

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 89.6% faster than CRuby 3.5.0dev
  • 1.8% slower than YJIT 3.4.7
On railsbench it is
  • 105.3% faster than CRuby 3.5.0dev
  • 5.0% faster than YJIT 3.4.7
x86_64 runtime: 7 hours, 10 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.4.7 warmups CRuby 3.4.7 iters CRuby 3.5.0dev warmups CRuby 3.5.0dev iters YJIT 3.4.7 warmups YJIT 3.4.7 iters YJIT 3.5.0dev warmups YJIT 3.5.0dev iters
activerecord 5 84 5 86 50 192 50 213
chunky-png 5 31 5 32 50 33 50 26
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 421 5 386 50 625 50 501
liquid-compile 5 420 5 471 50 582 50 713
liquid-render 5 168 5 163 50 432 50 349
lobsters 5 20 5 20 50 10 50 10
mail 5 195 5 181 50 254 50 218
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 150 5 156 50 248 50 245
ruby-lsp 5 146 5 145 50 241 50 241
sequel 5 427 5 420 50 596 50 576
shipit 5 10 5 10 50 10 50 10
binarytrees 5 82 5 80 50 136 50 128
blurhash 5 83 5 88 50 143 50 144
erubi 5 129 5 133 50 136 50 127
etanni 5 98 5 66 50 72 50 31
fannkuchredux 5 55 5 57 50 102 50 99
fluentd 5 56 5 57 50 20 50 27
graphql 5 361 5 443 50 570 50 924
graphql-native 5 57 5 82 50 22 50 64
knucleotide 5 163 5 154 50 117 50 108
lee 5 23 5 22 50 10 50 10
matmul 5 51 5 52 50 95 50 87
nbody 5 247 5 286 50 676 50 647
nqueens 5 116 5 129 50 557 50 556
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 176 50 706 50 689
protoboeuf-encode 5 198 5 206 50 829 50 810
rack 5 441 5 440 50 712 50 679
ruby-json 5 82 5 81 50 47 50 47
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 48 50 156 50 147
tinygql 5 41 5 41 50 39 50 47
30k_ifelse 5 28 5 27 50 185 50 183
30k_methods 5 38 5 37 50 458 50 455
attr_accessor 5 157 5 200 50 1836 50 1924
cfunc_itself 5 348 5 344 50 1255 50 1258
fib 5 124 5 140 50 940 50 940
getivar 5 216 5 304 50 2316 50 2413
keyword_args 5 100 5 107 50 1240 50 1242
loops-times 5 23 5 25 50 64 50 55
object-new 5 268 5 355 50 299 50 591
respond_to 5 139 5 139 50 3888 50 3898
ruby-xor 5 236 5 252 50 1314 50 1271
send_bmethod 5 117 5 118 50 5539 50 5543
send_cfunc_block 5 106 5 105 50 353 50 340
send_rubyfunc_block 5 250 5 237 50 6926 50 6933
setivar 5 360 5 331 50 4925 50 4898
setivar_object 5 341 5 344 50 750 50 547
setivar_young 5 341 5 345 50 794 50 565
str_concat 5 390 5 410 50 1202 50 1012
structaref 5 157 5 194 50 1812 50 1891
throw 5 1088 5 1109 50 1429 50 1522

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) 1548908 1306578 205 2579 0 0% 0 0 73.062282
chunky-png (click) 318612 285406 74 1322 1 0% 0 0 37.747164
erubi-rails (click) 1970049 1779956 261 3669 22 0% 0 0 98.686443
hexapdf (click) 1526433 1367868 593 15695 44 0% 0 0 439.393556
liquid-c (click) 556018 512033 114 2228 5 0% 0 0 59.451503
liquid-compile (click) 478602 406037 146 2707 2 0% 0 0 78.706842
liquid-render (click) 662150 627206 131 2946 8 0% 0 0 79.022024
lobsters (click) 8460163 7003918 3100 62430 118 0% 0 0 2161.333694
mail (click) 864076 768478 342 7696 40 0% 0 0 212.383347
psych-load (click) 288348 241745 61 832 2 0% 0 0 23.760781
railsbench (click) 3350511 2992877 1605 19563 47 0% 0 0 549.995539
rubocop (click) 5759577 4915511 3001 56842 125 0% 6 0 1682.467372
ruby-lsp (click) 954091 849014 347 6797 44 0% 1 0 183.245429
sequel (click) 502771 390400 11 119 0 0% 0 0 3.905611
shipit (click) 7620449 6484509 3263 52038 180 0% 0 0 1716.298573
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.827567
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.986021
erubi (click) 235546 209809 6 134 0 0% 0 0 3.981323
etanni (click) 32930 35718 8 114 0 0% 0 0 3.641709
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.987894
fluentd (click) 490579 425482 7 115 0 0% 0 0 3.736764
graphql (click) 410111 353291 73 1921 19 0% 0 0 53.758853
graphql-native (click) 354233 262175 39 532 0 0% 0 0 14.004127
knucleotide (click) 9997 11103 7 113 0 0% 0 0 7.241623
lee (click) 318258 280556 49 1097 0 0% 0 0 31.68928
matmul (click) 11103 4709 8 136 0 0% 0 0 4.248302
nbody (click) 14448 21176 6 251 0 0% 0 0 6.167632
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.249819
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 111.098286
protoboeuf (click) 170129 177717 12 2837 0 0% 0 0 72.640004
protoboeuf-encode (click) 243065 283735 14 1816 0 0% 0 0 44.827689
rack (click) 280849 240597 35 580 0 0% 0 0 15.166871
ruby-json (click) 19868 17928 8 206 0 0% 0 0 5.680651
rubyboy (click) 703567 670680 154 6868 42 0% 0 0 167.469932
rubykon (click) 145449 177646 137 2062 3 0% 0 0 55.779886
sudoku (click) 52278 66593 7 878 0 0% 0 0 23.265347
tinygql (click) 300218 287629 59 1031 5 0% 0 0 27.211995
30k_ifelse (click) 6222887 5052688 9260 75477 0 0% 0 0 1929.342379
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 489.29297
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.139488
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.55012
fib (click) 2659 2995 3 30 0 0% 0 0 1.11841
getivar (click) 3789 6778 3 79 0 0% 0 0 2.013242
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.847175
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.913051
object-new (click) 2406 2818 2 36 0 0% 0 0 1.103697
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.126492
ruby-xor (click) 6026 856 4 105 0 0% 0 0 2.833299
send_bmethod (click) 5238 4968 6 71 0 0% 0 0 1.773782
send_cfunc_block (click) 14669 12471 5 195 0 0% 0 0 4.303335
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.500187
setivar (click) 2783 3726 3 46 0 0% 0 0 1.309397
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.477169
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.775836
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.502485
structaref (click) 4407 9095 3 88 0 0% 0 0 2.374604
throw (click) 5953 4624 5 53 0 0% 0 0 1.77893

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.