Ruby Benchmarks

Details for Benchmarks at 2026-02-24 00:50:04 UTC

YJIT metrics from the ruby-bench suite using Ruby f3ee4bd0ab.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 95.6% faster than CRuby 4.1.0dev
  • 7.0% faster than YJIT 3.4.7
On railsbench it is
  • 114.2% faster than CRuby 4.1.0dev
  • 12.2% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 23 minutes
aarch64 runtime: 7 hours, 17 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 90 5 99 50 191 50 238
chunky-png 5 31 5 32 50 33 50 28
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 421 5 431 50 626 50 640
liquid-compile 5 418 5 483 50 582 50 738
liquid-render 5 171 5 174 50 412 50 447
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 198 50 254 50 276
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 153 5 160 50 247 50 251
ruby-lsp 5 160 5 164 50 230 50 234
sequel 5 414 5 439 50 604 50 635
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 28 50 11 50 14
addressable-getters 5 164 5 174 50 183 50 207
addressable-join 5 73 5 82 50 65 50 78
addressable-merge 5 159 5 162 50 223 50 227
addressable-new 5 353 5 362 50 526 50 527
addressable-normalize 5 53 5 55 50 59 50 63
addressable-parse 5 104 5 108 50 104 50 113
addressable-setters 5 185 5 188 50 230 50 242
addressable-to-s 5 164 5 172 50 182 50 201
binarytrees 5 82 5 87 50 136 50 148
blurhash 5 83 5 86 50 143 50 145
erubi 5 134 5 148 50 136 50 149
etanni 5 98 5 70 50 71 50 39
fannkuchredux 5 54 5 57 50 102 50 108
fluentd 5 56 5 62 50 20 50 34
graphql 5 370 5 465 50 575 50 939
graphql-native 5 59 5 88 50 21 50 69
knucleotide 5 163 5 157 50 118 50 112
lee 5 23 5 23 50 10 50 10
matmul 5 51 5 56 50 95 50 96
nbody 5 246 5 295 50 676 50 703
nqueens 5 116 5 126 50 556 50 593
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 178 50 707 50 781
protoboeuf-encode 5 195 5 199 50 834 50 776
rack 5 444 5 462 50 709 50 719
ruby-json 5 81 5 100 50 46 50 75
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
sudoku 5 48 5 49 50 157 50 163
tinygql 5 41 5 44 50 41 50 52
30k_ifelse 5 28 5 28 50 185 50 185
30k_methods 5 38 5 40 50 452 50 459
attr_accessor 5 157 5 196 50 1833 50 1922
cfunc_itself 5 348 5 347 50 1255 50 1259
fib 5 124 5 143 50 940 50 939
getivar 5 215 5 313 50 2314 50 2421
getivar-module 5 103 5 137 50 90 50 268
keyword_args 5 100 5 101 50 1240 50 1242
loops-times 5 23 5 27 50 64 50 59
object-new 5 268 5 411 50 298 50 901
respond_to 5 139 5 139 50 3890 50 3904
ruby-xor 5 236 5 245 50 1313 50 1299
send_bmethod 5 117 5 125 50 5538 50 4527
send_cfunc_block 5 106 5 106 50 352 50 384
send_rubyfunc_block 5 250 5 253 50 6925 50 6924
setivar 5 359 5 482 50 4924 50 5044
setivar_object 5 341 5 307 50 753 50 641
setivar_young 5 341 5 309 50 800 50 660
str_concat 5 391 5 462 50 1200 50 1191
structaref 5 156 5 204 50 1811 50 1904
structaset 5 202 5 266 50 395 50 499
throw 5 1089 5 1438 50 1407 50 1854

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) 1551264 1349173 203 2647 0 0% 0 0 75.018949
chunky-png (click) 320301 286047 79 1376 1 0% 0 0 39.034748
erubi-rails (click) 1377311 1116499 269 3694 22 0% 0 0 98.173335
hexapdf (click) 1525084 1295568 593 15710 44 0% 0 0 439.02897
liquid-c (click) 557882 470798 114 2236 5 0% 0 0 59.115385
liquid-compile (click) 480239 405632 146 2714 2 0% 0 0 78.6451
liquid-render (click) 664898 602773 131 2959 8 0% 0 0 79.65638
lobsters (click) 8695794 7344046 3125 64191 122 0% 0 0 2106.012601
mail (click) 871785 814413 345 7728 40 0% 0 0 214.018202
psych-load (click) 287608 239341 61 831 2 0% 0 0 23.832707
railsbench (click) 3354964 2969315 1592 19794 97 0% 0 0 553.784132
rubocop (click) 5779858 5085761 3002 57097 125 0% 6 0 1660.515152
ruby-lsp (click) 1041868 903597 409 7472 47 0% 1 0 205.991252
sequel (click) 503021 422080 11 119 0 0% 0 0 4.040389
shipit (click) 7276658 6141857 3383 53895 168 0% 1 0 1791.232401
addressable-equality (click) 317291 260422 44 1380 1 0% 0 0 34.210291
addressable-getters (click) 277623 203384 26 863 0 0% 0 0 20.986563
addressable-join (click) 282251 251441 24 941 0 0% 0 0 23.386905
addressable-merge (click) 282003 237387 27 896 0 0% 0 0 22.026945
addressable-new (click) 258297 212125 21 591 0 0% 0 0 14.658431
addressable-normalize (click) 301849 251430 43 1362 1 0% 0 0 33.694078
addressable-parse (click) 280340 221643 26 880 0 0% 0 0 21.652094
addressable-setters (click) 257024 204403 20 582 0 0% 0 0 14.410938
addressable-to-s (click) 276446 250065 26 849 0 0% 0 0 20.359771
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.793639
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.299618
erubi (click) 248439 239112 6 134 0 0% 0 0 3.879587
etanni (click) 33355 27108 8 114 0 0% 0 0 3.446076
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.002517
fluentd (click) 487879 444481 7 116 0 0% 0 0 3.720843
graphql (click) 410308 358416 73 1909 19 0% 0 0 53.752357
graphql-native (click) 353760 331535 39 532 0 0% 0 0 14.120942
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.888325
lee (click) 317247 251878 49 1102 0 0% 0 0 30.98014
matmul (click) 11103 4709 8 136 0 0% 0 0 4.24189
nbody (click) 14448 21176 6 251 0 0% 0 0 6.152041
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.393221
optcarrot (click) 319416 277986 188 4589 34 0% 0 0 108.586087
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 73.354704
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 43.937847
rack (click) 282821 241808 35 581 0 0% 0 0 15.209212
ruby-json (click) 20323 18532 8 206 0 0% 0 0 5.673584
rubyboy (click) 704259 678614 154 6871 42 0% 0 0 167.631777
rubykon (click) 150715 174889 138 2130 4 0% 0 0 57.458774
sudoku (click) 51776 65830 7 871 0 0% 0 0 23.112594
tinygql (click) 300584 287619 59 1025 5 0% 0 0 26.951662
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1951.656118
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 490.411548
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.069893
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.500516
fib (click) 2659 2995 3 30 0 0% 0 0 1.121884
getivar (click) 3789 6778 3 79 0 0% 0 0 1.954569
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.280112
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.827966
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.89962
object-new (click) 2406 2818 2 36 0 0% 0 0 1.068117
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.168925
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.785638
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.811003
send_cfunc_block (click) 13777 10257 5 192 0 0% 0 0 3.728402
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.437136
setivar (click) 2783 3726 3 46 0 0% 0 0 1.263141
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.397609
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.658562
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.467991
structaref (click) 4407 9095 3 88 0 0% 0 0 2.384087
structaset (click) 4113 5834 3 70 0 0% 0 0 1.780645
throw (click) 5953 4624 5 53 0 0% 0 0 1.752349

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.