Ruby Benchmarks

Details for Benchmarks at 2026-04-14 01:03:55 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 97.9% faster than CRuby 4.1.0dev
  • 6.3% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 49 minutes
aarch64 runtime: 7 hours, 40 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 94 50 203 50 222
chunky-png 5 32 5 30 50 34 50 29
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 423 5 439 50 631 50 661
liquid-compile 5 420 5 485 50 583 50 744
liquid-render 5 174 5 172 50 430 50 450
mail 5 193 5 200 50 253 50 285
psych-load 5 10 5 10 50 10 50 10
rubocop 5 154 5 155 50 248 50 244
ruby-lsp 5 163 5 164 50 237 50 236
sequel 5 422 5 449 50 601 50 631
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 27 50 12 50 12
addressable-getters 5 164 5 168 50 183 50 199
addressable-join 5 75 5 79 50 66 50 72
addressable-merge 5 161 5 152 50 223 50 222
addressable-new 5 349 5 342 50 517 50 520
addressable-normalize 5 53 5 54 50 60 50 59
addressable-parse 5 104 5 104 50 104 50 111
addressable-setters 5 185 5 177 50 233 50 232
addressable-to-s 5 164 5 167 50 182 50 197
binarytrees 5 82 5 85 50 136 50 143
blurhash 5 84 5 84 50 145 50 145
erubi 5 129 5 156 50 122 50 157
etanni 5 100 5 80 50 72 50 46
fannkuchredux 5 55 5 57 50 101 50 105
fluentd 5 55 5 62 50 21 50 22
gcbench 5 10 5 10 50 10 50 15
graphql 5 370 5 458 50 534 50 935
graphql-native 5 57 5 87 50 22 50 72
knucleotide 5 163 5 144 50 117 50 97
lee 5 23 5 30 50 10 50 15
matmul 5 53 5 58 50 88 50 96
nbody 5 250 5 282 50 663 50 703
nqueens 5 119 5 122 50 555 50 578
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 174 5 178 50 697 50 795
protoboeuf-encode 5 201 5 193 50 800 50 793
rack 5 446 5 440 50 703 50 731
ruby-json 5 84 5 106 50 50 50 80
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 209 5 223 50 246 50 280
sudoku 5 48 5 49 50 155 50 160
tinygql 5 40 5 42 50 40 50 52
30k_ifelse 5 28 5 28 50 185 50 186
30k_methods 5 38 5 39 50 458 50 454
attr_accessor 5 157 5 175 50 1832 50 1881
cfunc_itself 5 347 5 317 50 1255 50 1259
fib 5 124 5 132 50 939 50 939
getivar 5 216 5 305 50 2306 50 2416
getivar-module 5 103 5 138 50 89 50 268
keyword_args 5 102 5 103 50 1240 50 1242
loops-times 5 23 5 25 50 63 50 63
object-new 5 268 5 467 50 298 50 1516
object-new-initialize 5 168 5 254 50 259 50 1021
object-new-no-escape 5 81 5 131 50 89 50 518
respond_to 5 139 5 130 50 3907 50 3903
ruby-xor 5 247 5 228 50 1305 50 1310
send_bmethod 5 118 5 115 50 5539 50 4526
send_cfunc_block 5 106 5 107 50 305 50 298
send_rubyfunc_block 5 196 5 208 50 1372 50 1376
setivar 5 359 5 471 50 4913 50 5037
setivar_object 5 341 5 349 50 764 50 661
setivar_young 5 341 5 348 50 810 50 692
str_concat 5 391 5 452 50 1201 50 1170
structaref 5 153 5 184 50 1800 50 1860
structaset 5 198 5 230 50 369 50 478
throw 5 1112 5 1394 50 1444 50 1792

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) 1563390 1317185 203 2671 0 0% 0 0 73.806938
chunky-png (click) 322110 295158 79 1376 1 0% 0 0 38.008183
erubi-rails (click) 1385936 1188704 268 3638 23 0% 0 0 100.574854
hexapdf (click) 1536732 1364582 593 15798 44 0% 0 0 429.103525
liquid-c (click) 563031 497666 114 2240 5 0% 0 0 58.982524
liquid-compile (click) 486161 418348 146 2733 2 0% 0 0 83.626405
liquid-render (click) 672000 559129 131 2963 8 0% 0 0 77.901216
mail (click) 876352 842658 345 7738 40 0% 0 0 208.652057
psych-load (click) 292898 252665 61 833 2 0% 0 0 23.672823
rubocop (click) 5793321 5015656 3002 57213 127 0% 6 0 1649.39139
ruby-lsp (click) 1047037 883930 409 7472 47 0% 1 0 199.362806
sequel (click) 492320 396841 11 121 0 0% 0 0 4.97741
shipit (click) 7243462 6223171 3119 50471 148 0% 0 0 1619.258472
addressable-equality (click) 321431 272212 44 1380 1 0% 0 0 36.026975
addressable-getters (click) 279306 236383 26 869 0 0% 0 0 22.28345
addressable-join (click) 287506 240390 24 945 0 0% 0 0 29.617287
addressable-merge (click) 287494 259359 27 900 0 0% 0 0 24.689489
addressable-new (click) 262250 215863 21 569 0 0% 0 0 14.354451
addressable-normalize (click) 313856 271529 43 1327 1 0% 0 0 33.807041
addressable-parse (click) 282302 222303 26 894 0 0% 0 0 23.383102
addressable-setters (click) 259212 205718 20 582 0 0% 0 0 15.878037
addressable-to-s (click) 263357 233054 26 849 0 0% 0 0 21.611543
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.752872
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.88413
erubi (click) 251950 200403 6 134 0 0% 0 0 3.90837
etanni (click) 32989 26478 8 114 0 0% 0 0 3.453522
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.855804
fluentd (click) 491827 455736 7 116 0 0% 0 0 3.601481
gcbench (click) 15808 8981 9 110 0 0% 0 0 3.574933
graphql (click) 395904 363437 73 1931 18 0% 0 0 52.433705
graphql-native (click) 358270 319054 39 532 0 0% 0 0 13.765934
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.637389
lee (click) 321778 272972 49 1099 0 0% 0 0 30.372303
matmul (click) 11103 4709 8 136 0 0% 0 0 4.136878
nbody (click) 14448 21176 6 251 0 0% 0 0 6.161924
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.267368
optcarrot (click) 321739 302768 188 4597 34 0% 0 0 106.633457
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 72.02688
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 43.16545
rack (click) 287708 246687 35 581 0 0% 0 0 15.272598
ruby-json (click) 19699 17751 8 206 0 0% 0 0 5.694417
rubyboy (click) 709165 666985 154 6877 42 0% 0 0 163.455208
rubykon (click) 148777 155950 138 2107 4 0% 0 0 55.461195
splay (click) 34953 22682 9 175 0 0% 0 0 5.46862
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.88293
tinygql (click) 301915 262694 59 1032 5 0% 0 0 26.456755
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1871.055137
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 473.822285
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.112052
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.52105
fib (click) 2659 2995 3 30 0 0% 0 0 1.076519
getivar (click) 3789 6778 3 79 0 0% 0 0 1.937265
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.310736
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.793998
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.881311
object-new (click) 2406 2818 2 36 0 0% 0 0 1.004036
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.271336
object-new-no-escape (click) 4540 5102 5 68 0 0% 0 0 2.011058
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.134599
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.808757
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.78625
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.312332
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.771454
setivar (click) 2783 3726 3 46 0 0% 0 0 1.266035
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.406301
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.702963
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.448781
structaref (click) 4407 9095 3 88 0 0% 0 0 2.344708
structaset (click) 4113 5834 3 70 0 0% 0 0 1.783564
throw (click) 5953 4624 5 53 0 0% 0 0 1.767369

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.