Ruby Benchmarks

Details for Benchmarks at 2026-01-31 00:48:02 UTC

YJIT metrics from the ruby-bench suite using Ruby 737809bf25.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 94.6% faster than CRuby 4.1.0dev
  • 5.6% faster than YJIT 3.4.7
On railsbench it is
  • 117.8% faster than CRuby 4.1.0dev
  • 12.2% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 9 minutes
aarch64 runtime: 7 hours, 3 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 92 5 97 50 201 50 233
chunky-png 5 31 5 33 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 420 5 427 50 625 50 643
liquid-compile 5 417 5 473 50 583 50 697
liquid-render 5 170 5 176 50 435 50 442
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 194 50 252 50 266
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 153 5 159 50 246 50 253
ruby-lsp 5 154 5 163 50 231 50 233
sequel 5 419 5 429 50 601 50 600
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 27 50 12 50 11
addressable-getters 5 164 5 167 50 183 50 196
addressable-join 5 73 5 76 50 66 50 71
addressable-merge 5 159 5 158 50 222 50 222
addressable-new 5 352 5 352 50 522 50 526
addressable-normalize 5 53 5 53 50 59 50 59
addressable-parse 5 104 5 104 50 105 50 109
addressable-setters 5 185 5 181 50 229 50 227
addressable-to-s 5 163 5 166 50 183 50 192
binarytrees 5 80 5 86 50 136 50 143
blurhash 5 83 5 87 50 143 50 145
erubi 5 137 5 147 50 135 50 148
etanni 5 98 5 72 50 71 50 37
fannkuchredux 5 54 5 57 50 101 50 102
fluentd 5 62 5 66 50 20 50 33
graphql 5 359 5 467 50 569 50 942
graphql-native 5 58 5 87 50 23 50 62
knucleotide 5 163 5 156 50 116 50 109
lee 5 23 5 24 50 10 50 10
matmul 5 51 5 54 50 94 50 94
nbody 5 246 5 290 50 675 50 660
nqueens 5 116 5 126 50 556 50 575
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 183 50 706 50 767
protoboeuf-encode 5 196 5 208 50 832 50 827
rack 5 438 5 454 50 712 50 710
ruby-json 5 82 5 99 50 50 50 72
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
sudoku 5 48 5 49 50 156 50 157
tinygql 5 41 5 44 50 39 50 49
30k_ifelse 5 28 5 28 50 184 50 183
30k_methods 5 38 5 40 50 448 50 453
attr_accessor 5 157 5 207 50 1836 50 1934
cfunc_itself 5 321 5 351 50 1253 50 1258
fib 5 124 5 143 50 939 50 939
getivar 5 217 5 325 50 2309 50 2419
getivar-module 5 104 5 138 50 90 50 268
keyword_args 5 100 5 99 50 1240 50 1243
loops-times 5 23 5 27 50 64 50 62
object-new 5 259 5 376 50 293 50 735
respond_to 5 139 5 141 50 3888 50 3897
ruby-xor 5 236 5 249 50 1310 50 1294
send_bmethod 5 117 5 124 50 5537 50 4525
send_cfunc_block 5 106 5 103 50 352 50 346
send_rubyfunc_block 5 248 5 254 50 6907 50 6928
setivar 5 358 5 476 50 4914 50 5034
setivar_object 5 341 5 299 50 756 50 636
setivar_young 5 341 5 301 50 798 50 660
str_concat 5 389 5 454 50 1201 50 1188
structaref 5 157 5 206 50 1807 50 1893
structaset 5 202 5 267 50 396 50 498
throw 5 1088 5 1335 50 1416 50 1660

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) 1541916 1294392 203 2652 0 0% 0 0 76.380419
chunky-png (click) 321022 296308 79 1374 1 0% 0 0 39.173813
erubi-rails (click) 1363329 1171767 269 3616 22 0% 0 0 97.555588
hexapdf (click) 1521444 1327577 594 15674 44 0% 0 0 438.616333
liquid-c (click) 557090 537037 114 2231 5 0% 0 0 59.619936
liquid-compile (click) 470590 447146 146 2673 2 0% 0 0 77.507431
liquid-render (click) 662394 578078 131 2950 8 0% 0 0 79.989877
lobsters (click) 8708311 7339265 3126 64281 117 0% 0 0 2135.931274
mail (click) 865170 874803 345 7700 40 0% 0 0 214.644919
psych-load (click) 285944 254866 61 829 2 0% 0 0 23.86017
railsbench (click) 3342909 2977076 1591 19718 97 0% 0 0 555.945918
rubocop (click) 5756666 4894721 3002 56848 125 0% 6 0 1664.367955
ruby-lsp (click) 1037475 881405 408 7395 47 0% 1 0 205.615008
sequel (click) 504290 415349 11 119 0 0% 0 0 3.983837
shipit (click) 7243315 6130067 3379 53599 169 0% 1 0 1778.825366
addressable-equality (click) 316129 291844 44 1379 1 0% 0 0 34.357093
addressable-getters (click) 277464 252690 26 865 0 0% 0 0 21.24868
addressable-join (click) 282028 251563 24 941 0 0% 0 0 23.361462
addressable-merge (click) 281441 236499 27 896 0 0% 0 0 22.168526
addressable-new (click) 245328 238810 21 563 0 0% 0 0 14.112727
addressable-normalize (click) 313096 272071 43 1345 1 0% 0 0 33.172995
addressable-parse (click) 280181 254565 26 882 0 0% 0 0 21.839938
addressable-setters (click) 245518 232894 20 582 0 0% 0 0 14.492423
addressable-to-s (click) 263462 219990 26 849 0 0% 0 0 20.683466
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.774446
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.295734
erubi (click) 246411 228488 6 132 0 0% 0 0 3.927976
etanni (click) 32382 26816 8 111 0 0% 0 0 3.438892
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.109036
fluentd (click) 483602 440991 7 115 0 0% 0 0 3.757828
graphql (click) 406557 315680 73 1895 19 1% 0 0 54.02396
graphql-native (click) 353042 325590 39 532 0 0% 0 0 14.403491
knucleotide (click) 9663 10633 7 107 0 0% 0 0 4.857485
lee (click) 304680 272985 49 1088 0 0% 0 0 31.629611
matmul (click) 11103 4709 8 136 0 0% 0 0 4.245366
nbody (click) 14448 21176 6 251 0 0% 0 0 6.165877
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.487126
optcarrot (click) 326157 307271 188 4744 34 0% 0 0 112.000802
protoboeuf (click) 169555 177006 12 2829 0 0% 0 0 73.264066
protoboeuf-encode (click) 242967 283659 14 1815 0 0% 0 0 44.536579
rack (click) 282632 260019 35 627 0 0% 0 0 16.442325
ruby-json (click) 19868 17928 8 206 0 0% 0 0 5.770949
rubyboy (click) 704759 614767 154 6875 42 0% 0 0 168.168024
rubykon (click) 147478 130977 137 2088 3 0% 0 0 56.674307
sudoku (click) 51704 65882 7 870 0 0% 0 0 23.286166
tinygql (click) 299948 237408 59 1031 5 0% 0 0 27.157902
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1963.99637
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 493.209954
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.077615
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.521396
fib (click) 2659 2995 3 30 0 0% 0 0 1.142254
getivar (click) 3789 6778 3 79 0 0% 0 0 1.957824
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.347399
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.834354
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.956858
object-new (click) 2406 2818 2 36 0 0% 0 0 1.020508
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.155824
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.788982
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.784058
send_cfunc_block (click) 14429 12201 5 192 0 0% 0 0 4.092845
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.462488
setivar (click) 2783 3726 3 46 0 0% 0 0 1.2755
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.397365
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.721512
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.467047
structaref (click) 4407 9095 3 88 0 0% 0 0 2.350148
structaset (click) 4113 5834 3 70 0 0% 0 0 1.794021
throw (click) 5953 4624 5 53 0 0% 0 0 1.749102

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.