Ruby Benchmarks

Details for Benchmarks at 2026-02-09 00:54:25 UTC

YJIT metrics from the ruby-bench suite using Ruby 510ebbdf6e.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 94.1% faster than CRuby 4.1.0dev
  • 5.8% faster than YJIT 3.4.7
On railsbench it is
  • 114.9% faster than CRuby 4.1.0dev
  • 13.4% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 21 minutes
aarch64 runtime: 7 hours, 14 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 91 5 98 50 199 50 237
chunky-png 5 31 5 33 50 33 50 29
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 421 5 431 50 629 50 639
liquid-compile 5 417 5 479 50 582 50 696
liquid-render 5 172 5 177 50 432 50 448
lobsters 5 20 5 20 50 10 50 10
mail 5 195 5 194 50 253 50 271
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 248 50 258
ruby-lsp 5 160 5 164 50 230 50 235
sequel 5 426 5 435 50 603 50 606
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 27 50 12 50 12
addressable-getters 5 163 5 173 50 183 50 204
addressable-join 5 74 5 76 50 65 50 71
addressable-merge 5 159 5 160 50 222 50 230
addressable-new 5 353 5 354 50 527 50 545
addressable-normalize 5 53 5 54 50 59 50 61
addressable-parse 5 103 5 105 50 103 50 114
addressable-setters 5 185 5 187 50 230 50 239
addressable-to-s 5 163 5 170 50 183 50 199
binarytrees 5 82 5 86 50 136 50 146
blurhash 5 83 5 88 50 143 50 145
erubi 5 128 5 149 50 135 50 153
etanni 5 98 5 73 50 71 50 39
fannkuchredux 5 55 5 57 50 102 50 106
fluentd 5 62 5 66 50 27 50 33
graphql 5 374 5 470 50 532 50 963
graphql-native 5 57 5 88 50 21 50 68
knucleotide 5 163 5 155 50 119 50 109
lee 5 23 5 24 50 10 50 10
matmul 5 51 5 55 50 94 50 96
nbody 5 247 5 291 50 661 50 698
nqueens 5 116 5 125 50 556 50 578
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 179 50 706 50 775
protoboeuf-encode 5 194 5 207 50 833 50 807
rack 5 444 5 457 50 704 50 728
ruby-json 5 82 5 102 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 49 50 157 50 167
tinygql 5 41 5 44 50 40 50 50
30k_ifelse 5 28 5 28 50 184 50 184
30k_methods 5 38 5 40 50 445 50 457
attr_accessor 5 158 5 205 50 1833 50 1922
cfunc_itself 5 348 5 350 50 1254 50 1259
fib 5 124 5 135 50 940 50 939
getivar 5 217 5 289 50 2315 50 2400
getivar-module 5 104 5 129 50 90 50 264
keyword_args 5 100 5 102 50 1239 50 1243
loops-times 5 23 5 27 50 63 50 62
object-new 5 268 5 387 50 295 50 780
respond_to 5 139 5 138 50 3891 50 3904
ruby-xor 5 236 5 235 50 1314 50 1282
send_bmethod 5 117 5 125 50 5539 50 4527
send_cfunc_block 5 105 5 106 50 353 50 341
send_rubyfunc_block 5 251 5 251 50 6925 50 6929
setivar 5 359 5 483 50 4927 50 5044
setivar_object 5 341 5 302 50 755 50 643
setivar_young 5 341 5 306 50 801 50 662
str_concat 5 391 5 459 50 1202 50 1175
structaref 5 156 5 196 50 1812 50 1890
structaset 5 203 5 273 50 397 50 495
throw 5 1089 5 1326 50 1420 50 1697

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) 1545139 1323372 203 2630 0 0% 0 0 74.349718
chunky-png (click) 320181 294793 79 1374 1 0% 0 0 39.356943
erubi-rails (click) 1369001 1122114 268 3647 22 0% 0 0 98.515868
hexapdf (click) 1522725 1304810 593 15682 44 0% 0 0 438.444736
liquid-c (click) 557358 529149 114 2231 5 0% 0 0 59.115484
liquid-compile (click) 480638 449084 146 2715 2 0% 0 0 79.333569
liquid-render (click) 664742 605347 131 2950 8 0% 0 0 79.784439
lobsters (click) 8696206 7323918 3124 64116 117 0% 0 0 2121.532145
mail (click) 864593 849658 345 7700 40 0% 0 0 213.119147
psych-load (click) 288093 249195 61 829 2 0% 0 0 24.049177
railsbench (click) 3348742 2868713 1591 19730 97 0% 0 0 555.687806
rubocop (click) 5768149 5022081 3002 56938 125 0% 6 0 1674.775257
ruby-lsp (click) 1039114 932745 409 7421 47 0% 1 0 207.291032
sequel (click) 502160 373070 11 119 0 0% 0 0 3.952897
shipit (click) 7263333 6291184 3379 53767 169 0% 1 0 1789.906935
addressable-equality (click) 317112 284637 44 1398 1 0% 0 0 35.068396
addressable-getters (click) 277303 244287 26 863 0 0% 0 0 20.986616
addressable-join (click) 281932 267828 24 941 0 0% 0 0 23.578898
addressable-merge (click) 282869 255549 27 898 0 0% 0 0 22.153881
addressable-new (click) 259007 230081 21 591 0 0% 0 0 14.794634
addressable-normalize (click) 313090 281004 43 1340 1 0% 0 0 33.339599
addressable-parse (click) 280181 254565 26 882 0 0% 0 0 21.933229
addressable-setters (click) 257895 222570 20 584 0 0% 0 0 14.646624
addressable-to-s (click) 275594 249513 26 849 0 0% 0 0 20.564669
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.792098
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.186298
erubi (click) 246361 220831 6 132 0 0% 0 0 3.941916
etanni (click) 32837 27420 8 111 0 0% 0 0 3.474191
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.044945
fluentd (click) 485919 452215 7 115 0 0% 0 0 3.714544
graphql (click) 408581 375410 73 1895 19 1% 0 0 53.169721
graphql-native (click) 352292 299625 39 532 0 0% 0 0 13.869292
knucleotide (click) 9663 10633 7 107 0 0% 0 0 4.90353
lee (click) 318377 288548 49 1088 0 0% 0 0 31.224482
matmul (click) 11103 4709 8 136 0 0% 0 0 4.274043
nbody (click) 14448 21176 6 251 0 0% 0 0 6.165856
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.529155
optcarrot (click) 318985 294662 188 4587 34 0% 0 0 108.909569
protoboeuf (click) 169555 177006 12 2829 0 0% 0 0 73.872994
protoboeuf-encode (click) 242967 283659 14 1815 0 0% 0 0 44.722903
rack (click) 283011 260289 35 632 0 0% 0 0 16.596417
ruby-json (click) 20323 18532 8 206 0 0% 0 0 5.664896
rubyboy (click) 704526 614516 154 6871 42 0% 0 0 168.110028
rubykon (click) 148982 149243 138 2107 4 0% 0 0 56.84485
sudoku (click) 51704 65882 7 870 0 0% 0 0 23.119323
tinygql (click) 299655 228900 59 1031 5 0% 0 0 26.980403
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1955.993266
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 490.6778
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.090014
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.498207
fib (click) 2659 2995 3 30 0 0% 0 0 1.13809
getivar (click) 3789 6778 3 79 0 0% 0 0 1.904015
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.336848
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.817259
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.934428
object-new (click) 2406 2818 2 36 0 0% 0 0 1.045419
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.155147
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.818698
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.833348
send_cfunc_block (click) 14429 12201 5 192 0 0% 0 0 4.124643
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.498786
setivar (click) 2783 3726 3 46 0 0% 0 0 1.251318
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.448076
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.71754
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.467796
structaref (click) 4407 9095 3 88 0 0% 0 0 2.362069
structaset (click) 4113 5834 3 70 0 0% 0 0 1.780758
throw (click) 5953 4624 5 53 0 0% 0 0 1.817468

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.