Ruby Benchmarks

Details for Benchmarks at 2026-01-15 00:41:31 UTC

YJIT metrics from the ruby-bench suite using Ruby 4a21b83693.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 94.7% faster than CRuby 4.1.0dev
  • 4.9% faster than YJIT 3.4.7
On railsbench it is
  • 114.4% faster than CRuby 4.1.0dev
  • 12.6% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 18 minutes
aarch64 runtime: 7 hours, 11 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 4.1.0dev warmups CRuby 4.1.0dev iters YJIT 3.4.7 warmups YJIT 3.4.7 iters YJIT 4.1.0dev warmups YJIT 4.1.0dev iters
activerecord 5 91 5 97 50 198 50 233
chunky-png 5 31 5 33 50 33 50 30
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 422 5 422 50 627 50 631
liquid-compile 5 406 5 474 50 581 50 712
liquid-render 5 172 5 174 50 433 50 439
mail 5 195 5 190 50 253 50 260
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 153 5 157 50 248 50 251
ruby-lsp 5 159 5 163 50 225 50 229
sequel 5 425 5 426 50 586 50 592
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 27 50 11 50 10
addressable-getters 5 164 5 165 50 184 50 190
addressable-join 5 72 5 75 50 65 50 68
addressable-merge 5 159 5 157 50 222 50 215
addressable-new 5 354 5 346 50 525 50 507
addressable-normalize 5 53 5 53 50 60 50 56
addressable-parse 5 104 5 102 50 105 50 104
addressable-setters 5 182 5 178 50 229 50 221
addressable-to-s 5 162 5 167 50 183 50 186
binarytrees 5 82 5 82 50 136 50 131
blurhash 5 83 5 87 50 143 50 144
erubi 5 128 5 143 50 135 50 149
etanni 5 98 5 71 50 71 50 36
fannkuchredux 5 55 5 57 50 102 50 102
fluentd 5 62 5 65 50 20 50 31
graphql 5 372 5 467 50 571 50 916
graphql-native 5 59 5 85 50 22 50 62
knucleotide 5 163 5 158 50 117 50 112
lee 5 23 5 23 50 10 50 10
matmul 5 51 5 56 50 94 50 96
nbody 5 247 5 271 50 677 50 669
nqueens 5 116 5 129 50 557 50 575
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 180 50 706 50 704
protoboeuf-encode 5 194 5 207 50 835 50 767
rack 5 438 5 447 50 724 50 684
ruby-json 5 81 5 98 50 50 50 70
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
sudoku 5 48 5 49 50 156 50 156
tinygql 5 41 5 43 50 40 50 47
30k_ifelse 5 28 5 28 50 186 50 185
30k_methods 5 38 5 40 50 458 50 455
attr_accessor 5 157 5 203 50 1836 50 1927
cfunc_itself 5 348 5 342 50 1254 50 1259
fib 5 124 5 145 50 940 50 939
getivar 5 215 5 335 50 2314 50 2393
getivar-module 5 105 5 143 50 90 50 270
keyword_args 5 100 5 110 50 1239 50 1243
loops-times 5 23 5 26 50 64 50 62
object-new 5 268 5 365 50 299 50 677
respond_to 5 139 5 136 50 3887 50 3903
ruby-xor 5 236 5 246 50 1314 50 1289
send_bmethod 5 116 5 122 50 5538 50 4527
send_cfunc_block 5 106 5 105 50 353 50 340
send_rubyfunc_block 5 251 5 248 50 6926 50 6923
setivar 5 360 5 483 50 4925 50 5046
setivar_object 5 341 5 303 50 750 50 529
setivar_young 5 341 5 307 50 798 50 555
str_concat 5 391 5 436 50 1200 50 1186
structaref 5 156 5 209 50 1813 50 1912
structaset 5 201 5 269 50 396 50 504
throw 5 1085 5 1247 50 1408 50 1541

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) 1544566 1347921 203 2653 0 0% 0 0 75.023007
chunky-png (click) 320784 304307 79 1374 1 0% 0 0 39.09721
erubi-rails (click) 1364073 1248927 268 3625 22 0% 0 0 95.603255
hexapdf (click) 1521400 1262475 593 15676 44 0% 0 0 436.224993
liquid-c (click) 555455 478384 114 2231 5 0% 0 0 59.093245
liquid-compile (click) 478599 389403 146 2718 2 0% 0 0 79.621793
liquid-render (click) 662371 537020 131 2952 8 0% 0 0 79.192654
mail (click) 867427 837921 345 7725 40 0% 0 0 213.329298
psych-load (click) 286445 238971 61 829 2 0% 0 0 23.501974
railsbench (click) 3348847 2991480 1591 19782 97 0% 0 0 591.027737
rubocop (click) 5772594 4865521 3002 57030 125 0% 6 0 1661.513872
ruby-lsp (click) 1035995 962251 408 7398 47 0% 1 0 204.601047
sequel (click) 502631 406064 11 119 0 0% 0 0 3.983232
shipit (click) 7525829 6385868 3283 52078 182 0% 0 0 1781.520085
addressable-equality (click) 317112 252047 44 1400 1 0% 0 0 34.536903
addressable-getters (click) 276403 250941 26 863 0 0% 0 0 20.974731
addressable-join (click) 281872 275997 24 941 0 0% 0 0 23.4653
addressable-merge (click) 281903 270363 27 896 0 0% 0 0 22.171938
addressable-new (click) 255974 226263 21 565 0 0% 0 0 14.136279
addressable-normalize (click) 311502 278672 43 1328 1 0% 0 0 32.323522
addressable-parse (click) 278289 227555 26 880 0 0% 0 0 21.62184
addressable-setters (click) 256003 220136 20 582 0 0% 0 0 14.411749
addressable-to-s (click) 275185 232831 26 849 0 0% 0 0 20.560265
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.835296
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.052562
erubi (click) 247132 205314 6 134 0 0% 0 0 3.96653
etanni (click) 32832 35642 8 113 0 0% 0 0 3.484143
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.07718
fluentd (click) 483222 391575 7 115 0 0% 0 0 3.770983
graphql (click) 411341 354410 73 1938 19 0% 0 0 55.262796
graphql-native (click) 354588 327906 39 532 0 0% 0 0 14.127862
knucleotide (click) 9997 11103 7 113 0 0% 0 0 5.114623
lee (click) 316475 253536 49 1098 0 0% 0 0 31.085149
matmul (click) 11103 4709 8 136 0 0% 0 0 4.239519
nbody (click) 14448 21176 6 251 0 0% 0 0 6.137373
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.395708
optcarrot (click) 326157 307271 188 4744 34 0% 0 0 112.661538
protoboeuf (click) 169555 177006 12 2829 0 0% 0 0 71.501224
protoboeuf-encode (click) 242967 283659 14 1815 0 0% 0 0 44.226161
rack (click) 281361 250266 35 627 0 0% 0 0 16.391507
ruby-json (click) 19868 17928 8 206 0 0% 0 0 5.674376
rubyboy (click) 704837 615015 154 6871 42 0% 0 0 167.130095
rubykon (click) 149367 174409 137 2114 3 0% 0 0 57.831557
sudoku (click) 51704 65882 7 870 0 0% 0 0 23.085424
tinygql (click) 299528 254234 59 1031 5 0% 0 0 27.027727
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1939.675559
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 488.732079
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.076877
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.53302
fib (click) 2659 2995 3 30 0 0% 0 0 1.133164
getivar (click) 3789 6778 3 79 0 0% 0 0 1.904966
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.315801
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.812153
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.916731
object-new (click) 2406 2818 2 36 0 0% 0 0 1.087298
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.170772
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.807691
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.795228
send_cfunc_block (click) 14429 12201 5 192 0 0% 0 0 4.116966
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.476811
setivar (click) 2783 3726 3 46 0 0% 0 0 1.273977
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.397439
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.733098
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.452663
structaref (click) 4407 9095 3 88 0 0% 0 0 2.319006
structaset (click) 4113 5834 3 70 0 0% 0 0 1.795215
throw (click) 5953 4624 5 53 0 0% 0 0 1.843798

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.