Ruby Benchmarks

Details for Benchmarks at 2026-03-15 00:59:27 UTC

YJIT metrics from the ruby-bench suite using Ruby 79f7ce7400.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 95.4% faster than CRuby 4.1.0dev
  • 7.6% faster than YJIT 3.4.7
On railsbench it is
  • 118.8% faster than CRuby 4.1.0dev
  • 13.5% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 6 minutes
aarch64 runtime: 7 hours, 53 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 93 5 100 50 195 50 242
chunky-png 5 31 5 33 50 32 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 437 50 624 50 641
liquid-compile 5 415 5 476 50 583 50 717
liquid-render 5 172 5 176 50 432 50 451
lobsters 5 19 5 20 50 10 50 10
mail 5 194 5 198 50 252 50 278
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 153 5 161 50 245 50 258
ruby-lsp 5 157 5 162 50 223 50 236
sequel 5 427 5 447 50 593 50 618
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 28 50 11 50 15
addressable-getters 5 164 5 176 50 184 50 206
addressable-join 5 72 5 80 50 65 50 76
addressable-merge 5 160 5 164 50 221 50 234
addressable-new 5 353 5 367 50 522 50 546
addressable-normalize 5 53 5 55 50 59 50 64
addressable-parse 5 104 5 108 50 104 50 115
addressable-setters 5 185 5 191 50 229 50 244
addressable-to-s 5 163 5 173 50 183 50 205
binarytrees 5 82 5 87 50 136 50 148
blurhash 5 83 5 87 50 143 50 145
erubi 5 137 5 151 50 133 50 155
etanni 5 99 5 75 50 71 50 41
fannkuchredux 5 55 5 57 50 102 50 102
fluentd 5 56 5 63 50 21 50 28
gcbench 5 10 5 10 50 10 50 10
graphql 5 372 5 480 50 568 50 957
graphql-native 5 58 5 89 50 21 50 72
knucleotide 5 163 5 159 50 118 50 113
lee 5 23 5 31 50 10 50 10
matmul 5 51 5 50 50 95 50 97
nbody 5 246 5 271 50 676 50 703
nqueens 5 116 5 126 50 556 50 579
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 184 50 707 50 781
protoboeuf-encode 5 196 5 201 50 829 50 776
rack 5 445 5 450 50 714 50 715
ruby-json 5 81 5 104 50 50 50 75
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 210 5 232 50 239 50 286
sudoku 5 48 5 49 50 157 50 157
tinygql 5 41 5 43 50 36 50 48
30k_ifelse 5 28 5 28 50 185 50 184
30k_methods 5 38 5 40 50 455 50 457
attr_accessor 5 157 5 207 50 1835 50 1937
cfunc_itself 5 350 5 359 50 1255 50 1259
fib 5 123 5 141 50 939 50 939
getivar 5 216 5 292 50 2315 50 2405
getivar-module 5 104 5 124 50 90 50 259
keyword_args 5 100 5 105 50 1240 50 1243
loops-times 5 23 5 24 50 64 50 60
object-new 5 268 5 413 50 297 50 917
object-new-initialize 5 168 5 247 50 259 50 762
object-new-no-escape 5 81 5 130 50 89 50 373
respond_to 5 139 5 139 50 3894 50 3904
ruby-xor 5 236 5 247 50 1314 50 1300
send_bmethod 5 116 5 122 50 5538 50 4527
send_cfunc_block 5 107 5 106 50 353 50 383
send_rubyfunc_block 5 250 5 249 50 6925 50 6915
setivar 5 359 5 444 50 4924 50 5017
setivar_object 5 341 5 294 50 752 50 537
setivar_young 5 341 5 297 50 798 50 557
str_concat 5 389 5 444 50 1201 50 1202
structaref 5 156 5 198 50 1809 50 1898
structaset 5 201 5 257 50 396 50 498
throw 5 1091 5 1380 50 1427 50 1794

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) 1553130 1301186 203 2651 0 0% 0 0 75.115446
chunky-png (click) 321583 287940 79 1376 1 0% 0 0 39.20144
erubi-rails (click) 1375468 1221518 268 3664 22 0% 0 0 98.010713
hexapdf (click) 1526394 1240134 594 15716 44 0% 0 0 437.600155
liquid-c (click) 558613 520720 114 2232 5 0% 0 0 60.182274
liquid-compile (click) 480977 431112 146 2715 2 0% 0 0 78.730501
liquid-render (click) 665442 554111 131 2959 8 0% 0 0 79.189393
lobsters (click) 8720422 7298038 3125 64392 120 0% 0 0 2124.327906
mail (click) 871946 814486 345 7728 40 0% 0 0 214.921307
psych-load (click) 287703 280297 61 831 2 0% 0 0 23.793248
railsbench (click) 3351603 2916278 1592 19760 97 0% 0 0 552.882266
rubocop (click) 5781212 5086829 3003 57113 126 0% 6 0 1671.141551
ruby-lsp (click) 1038873 851866 408 7446 46 0% 1 0 203.780234
sequel (click) 503182 438546 11 119 0 0% 0 0 3.852493
shipit (click) 7150677 5971934 3299 52343 168 0% 0 0 1727.745989
addressable-equality (click) 319006 261641 44 1415 1 0% 0 0 35.19196
addressable-getters (click) 277874 244536 26 863 0 0% 0 0 21.062683
addressable-join (click) 283150 236506 24 941 0 0% 0 0 23.695268
addressable-merge (click) 283181 247256 27 896 0 0% 0 0 22.201318
addressable-new (click) 256401 234467 21 563 0 0% 0 0 14.132518
addressable-normalize (click) 315803 275369 43 1371 1 0% 0 0 33.976208
addressable-parse (click) 278877 252354 26 880 0 0% 0 0 21.845098
addressable-setters (click) 258207 238853 20 582 0 0% 0 0 14.803434
addressable-to-s (click) 277384 235159 26 849 0 0% 0 0 20.743023
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.82408
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.388926
erubi (click) 248090 197175 6 134 0 0% 0 0 3.909902
etanni (click) 32951 34772 8 114 0 0% 0 0 3.475206
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.160765
fluentd (click) 487623 403098 7 116 0 0% 0 0 3.716734
gcbench (click) 15808 8981 9 110 0 0% 0 0 3.53627
graphql (click) 410468 357809 73 1909 19 0% 0 0 53.595257
graphql-native (click) 354529 307628 39 532 0 0% 0 0 14.304816
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.731565
lee (click) 318177 286293 49 1099 0 0% 0 0 31.148664
matmul (click) 11103 4709 8 136 0 0% 0 0 4.212846
nbody (click) 14448 21176 6 251 0 0% 0 0 6.284
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.539775
optcarrot (click) 319416 277986 188 4589 34 0% 0 0 108.968293
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 73.71187
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 47.067675
rack (click) 270864 261563 35 581 0 0% 0 0 15.277761
ruby-json (click) 19462 17420 8 206 0 0% 0 0 5.798795
rubyboy (click) 704569 588718 154 6873 42 0% 0 0 169.657353
rubykon (click) 149260 164688 138 2112 4 0% 0 0 56.822148
splay (click) 34953 22682 9 175 0 0% 0 0 5.328131
sudoku (click) 51776 65830 7 871 0 0% 0 0 23.206537
tinygql (click) 301261 279973 59 1031 5 0% 0 0 27.348412
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1955.990625
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 492.662043
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.12989
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.540234
fib (click) 2659 2995 3 30 0 0% 0 0 1.149937
getivar (click) 3789 6778 3 79 0 0% 0 0 1.983537
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.39801
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.854886
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.949513
object-new (click) 2406 2818 2 36 0 0% 0 0 1.062211
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.335183
object-new-no-escape (click) 4540 5102 5 68 0 0% 0 0 1.980128
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.177359
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.832802
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.821936
send_cfunc_block (click) 13777 10257 5 192 0 0% 0 0 3.854556
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.481957
setivar (click) 2783 3726 3 46 0 0% 0 0 1.296586
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.432176
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.763337
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.465832
structaref (click) 4407 9095 3 88 0 0% 0 0 2.398319
structaset (click) 4113 5834 3 70 0 0% 0 0 1.826217
throw (click) 5953 4624 5 53 0 0% 0 0 1.76796

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.