Ruby Benchmarks

Details for Benchmarks at 2026-01-06 00:43:21 UTC

YJIT metrics from the ruby-bench suite using Ruby 5d26a2aeea.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 98.5% faster than CRuby 4.1.0dev
  • 4.3% faster than YJIT 3.4.7
On railsbench it is
  • 114.9% faster than CRuby 4.1.0dev
  • 10.0% 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 91 5 98 50 191 50 233
chunky-png 5 31 5 32 50 32 50 28
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 421 5 423 50 626 50 618
liquid-compile 5 418 5 475 50 581 50 722
liquid-render 5 172 5 173 50 435 50 432
mail 5 194 5 190 50 253 50 255
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 155 5 158 50 248 50 251
ruby-lsp 5 145 5 149 50 245 50 251
sequel 5 425 5 426 50 602 50 585
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 27 50 11 50 10
addressable-getters 5 164 5 168 50 183 50 192
addressable-join 5 73 5 76 50 66 50 67
addressable-merge 5 160 5 156 50 222 50 215
addressable-new 5 353 5 348 50 521 50 508
addressable-normalize 5 53 5 52 50 59 50 56
addressable-parse 5 103 5 104 50 104 50 106
addressable-setters 5 184 5 179 50 230 50 222
addressable-to-s 5 163 5 167 50 183 50 189
binarytrees 5 82 5 82 50 136 50 127
blurhash 5 83 5 87 50 143 50 145
erubi 5 135 5 149 50 139 50 152
etanni 5 98 5 72 50 72 50 36
fannkuchredux 5 52 5 57 50 102 50 104
fluentd 5 56 5 62 50 20 50 31
graphql 5 357 5 467 50 568 50 955
graphql-native 5 59 5 86 50 22 50 62
knucleotide 5 163 5 158 50 118 50 112
lee 5 23 5 24 50 10 50 10
matmul 5 51 5 54 50 95 50 97
nbody 5 247 5 277 50 677 50 701
nqueens 5 111 5 129 50 557 50 588
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 184 50 706 50 767
protoboeuf-encode 5 197 5 205 50 826 50 792
rack 5 444 5 448 50 718 50 698
ruby-json 5 84 5 98 50 46 50 70
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 162
tinygql 5 42 5 43 50 41 50 49
30k_ifelse 5 28 5 28 50 186 50 183
30k_methods 5 38 5 41 50 456 50 456
attr_accessor 5 157 5 199 50 1833 50 1910
cfunc_itself 5 348 5 351 50 1254 50 1259
fib 5 124 5 140 50 939 50 939
getivar 5 217 5 328 50 2316 50 2434
getivar-module 5 103 5 142 50 90 50 270
keyword_args 5 100 5 107 50 1239 50 1243
loops-times 5 23 5 26 50 64 50 60
object-new 5 268 5 365 50 297 50 681
respond_to 5 139 5 142 50 3888 50 3899
ruby-xor 5 237 5 246 50 1315 50 1287
send_bmethod 5 116 5 124 50 5538 50 4527
send_cfunc_block 5 105 5 106 50 353 50 340
send_rubyfunc_block 5 252 5 251 50 6924 50 6921
setivar 5 360 5 465 50 4923 50 5037
setivar_object 5 341 5 301 50 751 50 619
setivar_young 5 341 5 305 50 800 50 655
str_concat 5 396 5 455 50 1200 50 1185
structaref 5 156 5 198 50 1812 50 1887
structaset 5 202 5 266 50 397 50 510
throw 5 1089 5 1276 50 1420 50 1559

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) 1544004 1338358 203 2646 0 0% 0 0 76.122625
chunky-png (click) 320436 328516 79 1373 1 0% 0 0 39.147594
erubi-rails (click) 1362515 1187954 268 3652 22 0% 0 0 98.083897
hexapdf (click) 1520982 1360913 594 15660 44 0% 0 0 436.98266
liquid-c (click) 556404 545234 114 2228 5 0% 0 0 59.111105
liquid-compile (click) 478967 398206 146 2700 2 0% 0 0 79.407528
liquid-render (click) 663021 554432 131 2946 8 0% 0 0 79.652143
mail (click) 866884 902356 345 7721 40 0% 0 0 212.9196
psych-load (click) 287669 265435 61 828 2 0% 0 0 23.820232
railsbench (click) 3343581 2928840 1591 19755 97 0% 0 0 554.608505
rubocop (click) 5756825 5002089 3002 56849 126 0% 6 0 1663.816553
ruby-lsp (click) 959786 815380 343 6729 45 0% 1 0 181.807579
sequel (click) 502982 439517 11 119 0 0% 0 0 3.874982
shipit (click) 7835631 6492999 3421 55405 186 0% 1 0 1819.61951
addressable-equality (click) 316489 268401 44 1381 1 0% 0 0 34.318498
addressable-getters (click) 276864 235662 26 863 0 0% 0 0 21.021064
addressable-join (click) 284263 261523 24 941 0 0% 0 0 23.604271
addressable-merge (click) 282202 230354 27 896 0 0% 0 0 22.164204
addressable-new (click) 257558 220255 21 569 0 0% 0 0 14.516357
addressable-normalize (click) 315585 266408 43 1353 1 0% 0 0 33.238103
addressable-parse (click) 279514 221178 26 880 0 0% 0 0 21.933141
addressable-setters (click) 257228 230183 20 582 0 0% 0 0 14.633527
addressable-to-s (click) 276405 242873 26 849 0 0% 0 0 20.921942
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.810519
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.066087
erubi (click) 247589 247534 6 134 0 0% 0 0 3.965516
etanni (click) 33287 36246 8 113 0 0% 0 0 3.535997
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.052034
fluentd (click) 483658 408390 7 115 0 0% 0 0 3.772931
graphql (click) 409837 336554 73 1921 19 0% 0 0 53.725418
graphql-native (click) 354309 335890 39 532 0 0% 0 0 13.916635
knucleotide (click) 9997 11103 7 113 0 0% 0 0 5.005443
lee (click) 318713 305615 49 1097 0 0% 0 0 31.889022
matmul (click) 11103 4709 8 136 0 0% 0 0 4.309748
nbody (click) 14448 21176 6 251 0 0% 0 0 6.166485
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.37284
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 111.311163
protoboeuf (click) 169555 177006 12 2829 0 0% 0 0 72.774804
protoboeuf-encode (click) 242967 283659 14 1815 0 0% 0 0 44.817027
rack (click) 282527 251893 35 626 0 0% 0 0 16.521492
ruby-json (click) 20323 18532 8 206 0 0% 0 0 5.759776
rubyboy (click) 704402 687936 154 6864 42 0% 0 0 167.460381
rubykon (click) 146441 162602 137 2076 3 0% 0 0 56.404828
sudoku (click) 51704 65882 7 870 0 0% 0 0 23.121717
tinygql (click) 300252 263069 59 1031 5 0% 0 0 27.161296
30k_ifelse (click) 6222887 5052688 9260 75477 0 0% 0 0 1930.575716
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 490.866678
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.120132
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.554227
fib (click) 2659 2995 3 30 0 0% 0 0 1.12297
getivar (click) 3789 6778 3 79 0 0% 0 0 1.907743
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.327617
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.838313
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.927044
object-new (click) 2406 2818 2 36 0 0% 0 0 1.077505
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.167679
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.831663
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.830589
send_cfunc_block (click) 14429 12201 5 192 0 0% 0 0 4.180379
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.471606
setivar (click) 2783 3726 3 46 0 0% 0 0 1.285341
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.416468
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.716349
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.397457
structaref (click) 4407 9095 3 88 0 0% 0 0 2.344534
structaset (click) 3926 5614 3 70 0 0% 0 0 1.745862
throw (click) 5953 4624 5 53 0 0% 0 0 1.906631

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.