Ruby Benchmarks

Details for Benchmarks at 2026-02-12 00:53:11 UTC

YJIT metrics from the ruby-bench suite using Ruby 9aa30b512f.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 93.3% faster than CRuby 4.1.0dev
  • 5.7% faster than YJIT 3.4.7
On railsbench it is
  • 114.2% faster than CRuby 4.1.0dev
  • 11.7% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 25 minutes
aarch64 runtime: 7 hours, 18 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 231
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 418 5 433 50 628 50 639
liquid-compile 5 417 5 475 50 582 50 718
liquid-render 5 170 5 176 50 413 50 441
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 194 50 251 50 261
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 253
ruby-lsp 5 156 5 163 50 232 50 231
sequel 5 419 5 436 50 588 50 604
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 27 50 11 50 12
addressable-getters 5 163 5 174 50 183 50 198
addressable-join 5 74 5 77 50 64 50 70
addressable-merge 5 159 5 158 50 221 50 221
addressable-new 5 353 5 359 50 525 50 534
addressable-normalize 5 53 5 54 50 59 50 61
addressable-parse 5 104 5 105 50 104 50 113
addressable-setters 5 184 5 187 50 228 50 235
addressable-to-s 5 163 5 170 50 182 50 198
binarytrees 5 81 5 86 50 136 50 144
blurhash 5 83 5 86 50 143 50 145
erubi 5 136 5 148 50 139 50 148
etanni 5 99 5 73 50 71 50 38
fannkuchredux 5 54 5 57 50 101 50 105
fluentd 5 56 5 63 50 20 50 30
graphql 5 370 5 462 50 573 50 928
graphql-native 5 58 5 87 50 22 50 63
knucleotide 5 164 5 156 50 118 50 110
lee 5 23 5 23 50 10 50 10
matmul 5 51 5 56 50 94 50 96
nbody 5 246 5 297 50 676 50 658
nqueens 5 116 5 123 50 557 50 593
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 185 50 707 50 755
protoboeuf-encode 5 197 5 206 50 834 50 824
rack 5 436 5 459 50 707 50 723
ruby-json 5 81 5 101 50 46 50 74
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
sudoku 5 48 5 48 50 156 50 167
tinygql 5 41 5 44 50 40 50 50
30k_ifelse 5 28 5 28 50 186 50 184
30k_methods 5 38 5 41 50 455 50 454
attr_accessor 5 157 5 181 50 1833 50 1892
cfunc_itself 5 348 5 346 50 1255 50 1259
fib 5 124 5 144 50 940 50 940
getivar 5 216 5 313 50 2316 50 2421
getivar-module 5 104 5 131 50 90 50 265
keyword_args 5 100 5 95 50 1240 50 1243
loops-times 5 23 5 27 50 64 50 61
object-new 5 268 5 387 50 296 50 781
respond_to 5 139 5 136 50 3891 50 3901
ruby-xor 5 236 5 251 50 1314 50 1284
send_bmethod 5 116 5 126 50 5539 50 4527
send_cfunc_block 5 105 5 106 50 352 50 370
send_rubyfunc_block 5 249 5 252 50 6926 50 6924
setivar 5 359 5 487 50 4922 50 5047
setivar_object 5 341 5 303 50 751 50 641
setivar_young 5 341 5 306 50 798 50 662
str_concat 5 390 5 460 50 1201 50 1177
structaref 5 156 5 183 50 1812 50 1876
structaset 5 202 5 254 50 397 50 488
throw 5 1088 5 1308 50 1416 50 1692

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) 1551932 1365662 203 2645 0 0% 0 0 75.4083
chunky-png (click) 308670 256866 79 1376 1 0% 0 0 39.144318
erubi-rails (click) 1373226 1112156 268 3637 22 0% 0 0 96.859461
hexapdf (click) 1519858 1280088 593 15736 44 0% 0 0 440.184609
liquid-c (click) 558673 488759 114 2236 5 0% 0 0 59.685258
liquid-compile (click) 479774 438954 146 2702 2 0% 0 0 78.795027
liquid-render (click) 655792 599221 131 2959 8 0% 0 0 79.674173
lobsters (click) 8699439 7265199 3124 64174 117 0% 0 0 2117.523157
mail (click) 871542 814173 345 7728 40 0% 0 0 213.481836
psych-load (click) 288477 248996 61 831 2 0% 0 0 24.101468
railsbench (click) 3363296 2889951 1591 19829 97 0% 0 0 551.530877
rubocop (click) 5780517 4906312 3002 57104 125 0% 6 0 1661.005546
ruby-lsp (click) 1043820 906054 408 7446 46 0% 1 0 206.098437
sequel (click) 496684 461472 11 119 0 0% 0 0 3.940403
shipit (click) 7263371 6214887 3381 53825 168 0% 1 0 1759.257174
addressable-equality (click) 316942 275807 44 1389 1 0% 0 0 34.697351
addressable-getters (click) 277188 252167 26 863 0 0% 0 0 20.713024
addressable-join (click) 282841 252676 24 941 0 0% 0 0 23.768024
addressable-merge (click) 282872 255234 27 896 0 0% 0 0 22.11334
addressable-new (click) 248515 233641 21 569 0 0% 0 0 14.204703
addressable-normalize (click) 313444 280987 43 1341 1 0% 0 0 33.170351
addressable-parse (click) 267836 240104 26 882 0 0% 0 0 21.82292
addressable-setters (click) 253303 218533 20 582 0 0% 0 0 14.464651
addressable-to-s (click) 277173 218700 26 849 0 0% 0 0 20.75127
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.795291
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.179861
erubi (click) 248286 222616 6 134 0 0% 0 0 3.864277
etanni (click) 33355 27108 8 114 0 0% 0 0 3.476657
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.044302
fluentd (click) 480811 428138 7 116 0 0% 0 0 3.710608
graphql (click) 411601 359797 73 1909 19 0% 0 0 52.956318
graphql-native (click) 353589 273962 39 532 0 0% 0 0 14.256865
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.877728
lee (click) 317869 294282 49 1099 0 0% 0 0 31.16577
matmul (click) 11103 4709 8 136 0 0% 0 0 4.267344
nbody (click) 14448 21176 6 251 0 0% 0 0 6.193877
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.364444
optcarrot (click) 319416 277986 188 4589 34 0% 0 0 108.511568
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 72.26398
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 44.370816
rack (click) 283524 276067 35 581 0 0% 0 0 15.094394
ruby-json (click) 20323 18532 8 206 0 0% 0 0 5.696753
rubyboy (click) 693478 617146 154 6873 42 0% 0 0 167.73578
rubykon (click) 148777 155950 138 2107 4 0% 0 0 56.639664
sudoku (click) 51776 65830 7 871 0 0% 0 0 23.11291
tinygql (click) 300068 261851 59 1031 5 0% 0 0 26.92315
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1957.198817
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 491.586432
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.073683
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.501352
fib (click) 2659 2995 3 30 0 0% 0 0 1.126478
getivar (click) 3789 6778 3 79 0 0% 0 0 1.952173
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.349129
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.821613
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.93391
object-new (click) 2406 2818 2 36 0 0% 0 0 1.065104
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.200836
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.788427
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.848659
send_cfunc_block (click) 13777 10257 5 192 0 0% 0 0 3.783005
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.467767
setivar (click) 2783 3726 3 46 0 0% 0 0 1.289394
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.427058
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.678145
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.430094
structaref (click) 4407 9095 3 88 0 0% 0 0 2.35333
structaset (click) 4113 5834 3 70 0 0% 0 0 1.794358
throw (click) 5953 4624 5 53 0 0% 0 0 1.747484

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.