Ruby Benchmarks

Details for Benchmarks at 2026-01-04 00:48:14 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 96.6% faster than CRuby 4.1.0dev
  • 5.4% faster than YJIT 3.4.7
On railsbench it is
  • 114.0% faster than CRuby 4.1.0dev
  • 10.2% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 12 minutes
aarch64 runtime: 7 hours, 6 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 98 50 190 50 223
chunky-png 5 31 5 32 50 32 50 29
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 421 5 427 50 623 50 618
liquid-compile 5 419 5 474 50 553 50 713
liquid-render 5 169 5 174 50 436 50 441
mail 5 195 5 188 50 253 50 254
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 158 50 248 50 247
ruby-lsp 5 146 5 147 50 246 50 245
sequel 5 426 5 422 50 581 50 589
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 26 50 11 50 10
addressable-getters 5 164 5 164 50 184 50 192
addressable-join 5 73 5 77 50 66 50 67
addressable-merge 5 159 5 155 50 222 50 216
addressable-new 5 354 5 346 50 519 50 506
addressable-normalize 5 53 5 52 50 59 50 56
addressable-parse 5 103 5 103 50 104 50 105
addressable-setters 5 181 5 178 50 230 50 224
addressable-to-s 5 162 5 167 50 183 50 187
binarytrees 5 82 5 82 50 136 50 129
blurhash 5 83 5 88 50 143 50 143
erubi 5 138 5 139 50 135 50 153
etanni 5 97 5 68 50 72 50 34
fannkuchredux 5 55 5 57 50 102 50 104
fluentd 5 56 5 62 50 19 50 24
graphql 5 371 5 466 50 569 50 846
graphql-native 5 59 5 85 50 22 50 66
knucleotide 5 164 5 156 50 118 50 110
lee 5 23 5 23 50 10 50 10
matmul 5 51 5 54 50 94 50 96
nbody 5 246 5 275 50 676 50 667
nqueens 5 116 5 128 50 556 50 589
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 179 50 706 50 764
protoboeuf-encode 5 198 5 198 50 832 50 790
rack 5 441 5 449 50 713 50 697
ruby-json 5 81 5 98 50 46 50 70
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 49 50 156 50 161
tinygql 5 42 5 44 50 41 50 48
30k_ifelse 5 28 5 28 50 186 50 183
30k_methods 5 39 5 41 50 454 50 457
attr_accessor 5 157 5 196 50 1838 50 1919
cfunc_itself 5 348 5 345 50 1255 50 1259
fib 5 124 5 142 50 938 50 940
getivar 5 218 5 330 50 2317 50 2434
getivar-module 5 104 5 141 50 90 50 270
keyword_args 5 100 5 103 50 1240 50 1242
loops-times 5 23 5 26 50 63 50 60
object-new 5 268 5 364 50 299 50 673
respond_to 5 139 5 141 50 3891 50 3893
ruby-xor 5 236 5 245 50 1314 50 1290
send_bmethod 5 116 5 124 50 5538 50 4527
send_cfunc_block 5 105 5 106 50 353 50 339
send_rubyfunc_block 5 250 5 247 50 6922 50 6925
setivar 5 360 5 471 50 4925 50 5038
setivar_object 5 341 5 301 50 753 50 632
setivar_young 5 341 5 304 50 797 50 657
str_concat 5 390 5 461 50 1197 50 1186
structaref 5 155 5 200 50 1810 50 1891
structaset 5 200 5 252 50 396 50 508
throw 5 1089 5 1269 50 1416 50 1566

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) 1542355 1353563 203 2633 0 0% 0 0 74.946488
chunky-png (click) 320434 312152 79 1373 1 0% 0 0 38.911183
erubi-rails (click) 1366334 1151794 268 3669 22 0% 0 0 98.238466
hexapdf (click) 1522636 1346080 594 15674 44 0% 0 0 439.095143
liquid-c (click) 557944 522189 114 2228 5 0% 0 0 59.276542
liquid-compile (click) 477211 404585 146 2683 2 0% 0 0 77.28098
liquid-render (click) 663282 562724 131 2946 8 0% 0 0 79.338644
mail (click) 863570 866553 345 7721 40 0% 0 0 214.059789
psych-load (click) 287669 265435 61 828 2 0% 0 0 23.89897
railsbench (click) 3344070 3003142 1591 19733 97 0% 0 0 553.34889
rubocop (click) 5758747 4979074 3002 56870 125 0% 6 0 1667.442661
ruby-lsp (click) 959573 880407 343 6718 44 0% 1 0 181.980536
sequel (click) 502673 431335 11 119 0 0% 0 0 4.077745
shipit (click) 7420644 6299572 3283 51892 179 0% 0 0 1706.059846
addressable-equality (click) 318044 286354 44 1400 1 0% 0 0 34.781199
addressable-getters (click) 277326 236042 26 863 0 0% 0 0 21.046622
addressable-join (click) 282700 244535 24 941 0 0% 0 0 23.52457
addressable-merge (click) 282450 238693 27 896 0 0% 0 0 22.132317
addressable-new (click) 258087 220570 21 569 0 0% 0 0 14.438554
addressable-normalize (click) 313093 272816 43 1337 1 0% 0 0 32.953757
addressable-parse (click) 280043 246109 26 880 0 0% 0 0 21.89092
addressable-setters (click) 259761 231642 20 584 0 0% 0 0 14.902613
addressable-to-s (click) 276934 251380 26 849 0 0% 0 0 20.676848
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.807314
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.097418
erubi (click) 248114 223333 6 134 0 0% 0 0 3.954089
etanni (click) 33287 36246 8 113 0 0% 0 0 3.548002
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.042225
fluentd (click) 482727 432111 7 115 0 0% 0 0 3.776311
graphql (click) 405833 357514 73 1921 19 0% 0 0 53.946554
graphql-native (click) 354612 295167 39 532 0 0% 0 0 14.382172
knucleotide (click) 9997 11103 7 113 0 0% 0 0 6.706338
lee (click) 317276 271354 49 1097 0 0% 0 0 31.64209
matmul (click) 11103 4709 8 136 0 0% 0 0 4.257967
nbody (click) 14448 21176 6 251 0 0% 0 0 6.167614
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.38489
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 111.773875
protoboeuf (click) 169555 177006 12 2829 0 0% 0 0 72.19101
protoboeuf-encode (click) 242967 283659 14 1815 0 0% 0 0 44.401683
rack (click) 282527 268309 35 626 0 0% 0 0 16.480107
ruby-json (click) 20323 18532 8 206 0 0% 0 0 5.760108
rubyboy (click) 704100 605932 154 6868 42 0% 0 0 168.600767
rubykon (click) 146441 162602 137 2076 3 0% 0 0 55.369334
sudoku (click) 51704 65882 7 870 0 0% 0 0 23.170043
tinygql (click) 300779 271616 59 1031 5 0% 0 0 27.204331
30k_ifelse (click) 6222887 5052688 9260 75477 0 0% 0 0 1929.141355
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 491.270287
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.096191
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.530008
fib (click) 2659 2995 3 30 0 0% 0 0 1.121656
getivar (click) 3789 6778 3 79 0 0% 0 0 1.931544
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.341695
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.822019
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.961414
object-new (click) 2406 2818 2 36 0 0% 0 0 1.197425
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.184441
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.912864
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.824302
send_cfunc_block (click) 14429 12201 5 192 0 0% 0 0 4.161784
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.490336
setivar (click) 2783 3726 3 46 0 0% 0 0 1.263843
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.42307
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.724719
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.469271
structaref (click) 4407 9095 3 88 0 0% 0 0 2.322122
structaset (click) 3926 5614 3 70 0 0% 0 0 1.744571
throw (click) 5953 4624 5 53 0 0% 0 0 1.879122

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.