Ruby Benchmarks

Details for Benchmarks at 2026-01-21 00:44:15 UTC

YJIT metrics from the ruby-bench suite using Ruby 36809a8d0c.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 94.2% faster than CRuby 4.1.0dev
  • 4.7% faster than YJIT 3.4.7
On railsbench it is
  • 113.8% faster than CRuby 4.1.0dev
  • 11.2% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 7 minutes
aarch64 runtime: 7 hours, 2 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 96 50 190 50 222
chunky-png 5 31 5 32 50 33 50 29
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 422 5 429 50 626 50 629
liquid-compile 5 406 5 468 50 584 50 712
liquid-render 5 169 5 174 50 434 50 439
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 192 50 254 50 262
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 250
ruby-lsp 5 160 5 162 50 229 50 231
sequel 5 421 5 435 50 597 50 590
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 27 50 12 50 10
addressable-getters 5 163 5 165 50 184 50 187
addressable-join 5 73 5 78 50 63 50 67
addressable-merge 5 161 5 155 50 223 50 212
addressable-new 5 350 5 348 50 526 50 505
addressable-normalize 5 53 5 53 50 59 50 57
addressable-parse 5 104 5 102 50 104 50 103
addressable-setters 5 184 5 178 50 230 50 218
addressable-to-s 5 163 5 167 50 182 50 186
binarytrees 5 82 5 82 50 136 50 128
blurhash 5 83 5 87 50 143 50 144
erubi 5 129 5 144 50 139 50 144
etanni 5 98 5 70 50 71 50 35
fannkuchredux 5 54 5 54 50 95 50 99
fluentd 5 56 5 64 50 20 50 29
graphql 5 371 5 469 50 566 50 920
graphql-native 5 58 5 76 50 23 50 69
knucleotide 5 163 5 158 50 117 50 112
lee 5 23 5 22 50 10 50 10
matmul 5 51 5 55 50 94 50 95
nbody 5 246 5 275 50 676 50 703
nqueens 5 116 5 125 50 556 50 572
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 183 50 706 50 748
protoboeuf-encode 5 197 5 205 50 828 50 787
rack 5 440 5 448 50 720 50 674
ruby-json 5 82 5 97 50 47 50 71
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
sudoku 5 48 5 47 50 157 50 156
tinygql 5 42 5 43 50 40 50 50
30k_ifelse 5 28 5 28 50 173 50 185
30k_methods 5 38 5 41 50 457 50 456
attr_accessor 5 157 5 220 50 1834 50 1953
cfunc_itself 5 348 5 357 50 1255 50 1259
fib 5 124 5 147 50 938 50 939
getivar 5 217 5 315 50 2314 50 2426
getivar-module 5 104 5 138 50 90 50 268
keyword_args 5 100 5 107 50 1240 50 1243
loops-times 5 23 5 26 50 63 50 61
object-new 5 269 5 364 50 298 50 672
respond_to 5 139 5 137 50 3882 50 3902
ruby-xor 5 236 5 245 50 1315 50 1280
send_bmethod 5 116 5 123 50 5539 50 4527
send_cfunc_block 5 106 5 107 50 353 50 339
send_rubyfunc_block 5 250 5 250 50 6916 50 6928
setivar 5 360 5 480 50 4925 50 5044
setivar_object 5 341 5 301 50 754 50 639
setivar_young 5 341 5 304 50 794 50 654
str_concat 5 390 5 450 50 1201 50 1105
structaref 5 156 5 227 50 1811 50 1930
structaset 5 201 5 253 50 397 50 483
throw 5 1089 5 1256 50 1410 50 1534

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) 1542487 1295640 203 2639 0 0% 0 0 74.667954
chunky-png (click) 320882 296160 79 1374 1 0% 0 0 39.071095
erubi-rails (click) 1361322 1177884 268 3637 22 0% 0 0 97.724719
hexapdf (click) 1521405 1312062 593 15670 44 0% 0 0 437.047046
liquid-c (click) 558061 530529 114 2231 5 0% 0 0 60.058103
liquid-compile (click) 479001 446769 146 2690 2 0% 0 0 78.980208
liquid-render (click) 664140 604761 131 2950 8 0% 0 0 79.79133
lobsters (click) 8667541 7217727 3126 63829 117 0% 0 0 2100.264997
mail (click) 865967 843509 345 7700 40 0% 0 0 212.975423
psych-load (click) 288093 249195 61 829 2 0% 0 0 23.939861
railsbench (click) 3338918 2864639 1591 19694 97 0% 0 0 550.006435
rubocop (click) 5757234 4985393 3002 56854 125 0% 6 0 1662.261983
ruby-lsp (click) 1037734 857932 407 7369 46 0% 1 0 203.85713
sequel (click) 502851 439122 11 119 0 0% 0 0 3.764965
shipit (click) 7097342 6036595 3297 51881 169 0% 0 0 1705.388681
addressable-equality (click) 318477 286562 44 1398 1 0% 0 0 35.2239
addressable-getters (click) 277406 219850 26 863 0 0% 0 0 20.807782
addressable-join (click) 287218 250252 24 1005 0 0% 0 0 25.445968
addressable-merge (click) 282664 247117 27 896 0 0% 0 0 22.373701
addressable-new (click) 257642 212025 21 563 0 0% 0 0 14.347698
addressable-normalize (click) 314022 274016 43 1361 1 0% 0 0 33.574419
addressable-parse (click) 281558 247794 26 880 0 0% 0 0 21.479796
addressable-setters (click) 257207 246620 20 582 0 0% 0 0 14.607102
addressable-to-s (click) 278345 269929 26 889 0 0% 0 0 21.574508
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.820221
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.149398
erubi (click) 247156 214262 6 132 0 0% 0 0 3.984639
etanni (click) 32837 27420 8 111 0 0% 0 0 3.487487
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.085195
fluentd (click) 483602 449215 7 115 0 0% 0 0 3.733503
graphql (click) 408527 367209 73 1895 19 1% 0 0 53.465673
graphql-native (click) 353454 301360 39 532 0 0% 0 0 14.322526
knucleotide (click) 9663 10633 7 107 0 0% 0 0 4.890715
lee (click) 316935 287050 49 1088 0 0% 0 0 31.186607
matmul (click) 11103 4709 8 136 0 0% 0 0 4.204412
nbody (click) 14448 21176 6 251 0 0% 0 0 6.106856
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.324238
optcarrot (click) 326157 307271 188 4744 34 0% 0 0 111.400662
protoboeuf (click) 169555 177006 12 2829 0 0% 0 0 72.585218
protoboeuf-encode (click) 242967 283659 14 1815 0 0% 0 0 44.797113
rack (click) 285811 247486 35 671 0 0% 0 0 17.382801
ruby-json (click) 20323 18532 8 206 0 0% 0 0 5.7067
rubyboy (click) 704570 614565 154 6871 42 0% 0 0 167.638971
rubykon (click) 147885 147937 137 2093 3 0% 0 0 57.091463
sudoku (click) 51704 65882 7 870 0 0% 0 0 23.135251
tinygql (click) 300791 263499 59 1031 5 0% 0 0 27.352938
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1943.408604
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 488.945925
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.103758
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.528285
fib (click) 2659 2995 3 30 0 0% 0 0 1.142744
getivar (click) 3789 6778 3 79 0 0% 0 0 1.933279
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.342961
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.86002
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.87235
object-new (click) 2406 2818 2 36 0 0% 0 0 1.050257
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.150292
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.809801
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.823009
send_cfunc_block (click) 14429 12201 5 192 0 0% 0 0 4.151526
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.466635
setivar (click) 2783 3726 3 46 0 0% 0 0 1.28638
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.413118
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.756128
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.457371
structaref (click) 4407 9095 3 88 0 0% 0 0 2.35367
structaset (click) 4113 5834 3 70 0 0% 0 0 1.788138
throw (click) 5953 4624 5 53 0 0% 0 0 1.798113

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.