Ruby Benchmarks

Details for Benchmarks at 2026-03-25 00:54:11 UTC

YJIT metrics from the ruby-bench suite using Ruby 9a857c5413.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 92.7% faster than CRuby 4.1.0dev
  • 5.9% faster than YJIT 3.4.7
On railsbench it is
  • 113.1% faster than CRuby 4.1.0dev
  • 16.2% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 5 minutes
aarch64 runtime: 7 hours, 53 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 201 50 232
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 419 5 432 50 619 50 642
liquid-compile 5 421 5 484 50 582 50 723
liquid-render 5 172 5 175 50 431 50 449
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 204 50 253 50 266
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 160 50 246 50 258
ruby-lsp 5 153 5 161 50 239 50 233
sequel 5 426 5 442 50 585 50 619
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 28 50 12 50 14
addressable-getters 5 165 5 175 50 183 50 207
addressable-join 5 75 5 79 50 66 50 76
addressable-merge 5 161 5 161 50 223 50 230
addressable-new 5 353 5 360 50 518 50 536
addressable-normalize 5 53 5 55 50 60 50 63
addressable-parse 5 104 5 106 50 102 50 116
addressable-setters 5 185 5 187 50 234 50 245
addressable-to-s 5 165 5 175 50 182 50 200
binarytrees 5 82 5 89 50 136 50 160
blurhash 5 84 5 85 50 145 50 144
erubi 5 139 5 157 50 123 50 152
etanni 5 100 5 77 50 72 50 40
fannkuchredux 5 55 5 57 50 101 50 106
fluentd 5 55 5 67 50 21 50 31
gcbench 5 10 5 10 50 10 50 10
graphql 5 371 5 455 50 570 50 914
graphql-native 5 57 5 89 50 22 50 72
knucleotide 5 161 5 160 50 117 50 114
lee 5 23 5 31 50 10 50 11
matmul 5 53 5 52 50 87 50 96
nbody 5 250 5 259 50 663 50 663
nqueens 5 119 5 122 50 552 50 591
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 174 5 180 50 697 50 813
protoboeuf-encode 5 201 5 208 50 801 50 808
rack 5 439 5 456 50 715 50 737
ruby-json 5 83 5 101 50 50 50 72
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 208 5 236 50 250 50 291
sudoku 5 48 5 49 50 155 50 167
tinygql 5 42 5 43 50 40 50 51
30k_ifelse 5 28 5 28 50 186 50 185
30k_methods 5 38 5 41 50 448 50 456
attr_accessor 5 156 5 192 50 1832 50 1908
cfunc_itself 5 347 5 371 50 1255 50 1259
fib 5 124 5 148 50 939 50 936
getivar 5 210 5 328 50 2306 50 2426
getivar-module 5 103 5 140 50 88 50 251
keyword_args 5 103 5 106 50 1238 50 1243
loops-times 5 23 5 27 50 63 50 61
object-new 5 267 5 408 50 299 50 917
object-new-initialize 5 169 5 244 50 259 50 755
object-new-no-escape 5 81 5 131 50 89 50 374
respond_to 5 139 5 132 50 3896 50 3900
ruby-xor 5 247 5 243 50 1305 50 1300
send_bmethod 5 118 5 127 50 5538 50 4525
send_cfunc_block 5 105 5 107 50 354 50 383
send_rubyfunc_block 5 246 5 248 50 6885 50 6899
setivar 5 359 5 481 50 4927 50 5033
setivar_object 5 341 5 301 50 763 50 593
setivar_young 5 341 5 275 50 810 50 614
str_concat 5 391 5 459 50 1199 50 1182
structaref 5 153 5 197 50 1798 50 1890
structaset 5 198 5 269 50 368 50 503
throw 5 1107 5 1404 50 1441 50 1744

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) 1556877 1312108 203 2662 0 0% 0 0 74.160079
chunky-png (click) 323047 280715 79 1376 1 0% 0 0 38.888156
erubi-rails (click) 1374957 1178937 268 3649 22 0% 0 0 94.874474
hexapdf (click) 1528551 1357062 593 15729 44 0% 0 0 429.988784
liquid-c (click) 560771 538708 114 2236 5 0% 0 0 57.837079
liquid-compile (click) 482043 464686 146 2721 2 0% 0 0 76.349286
liquid-render (click) 668362 614108 131 2959 8 0% 0 0 77.356253
lobsters (click) 8725094 7344866 3126 64424 120 0% 0 0 2068.370307
mail (click) 873298 864620 345 7730 40 0% 0 0 207.98639
psych-load (click) 288060 272047 61 831 2 0% 0 0 23.59127
railsbench (click) 3354232 2819500 1592 19764 97 0% 0 0 534.732579
rubocop (click) 5795312 5035003 3002 57235 125 0% 6 0 1641.891557
ruby-lsp (click) 1043692 880724 408 7438 46 0% 1 0 201.525882
sequel (click) 505034 456278 11 119 0 0% 0 0 3.818758
shipit (click) 6901284 5916986 3135 50430 143 0% 0 0 1630.510083
addressable-equality (click) 319099 286247 44 1380 1 0% 0 0 33.827231
addressable-getters (click) 281989 238973 26 869 0 0% 0 0 20.781388
addressable-join (click) 283841 244924 24 941 0 0% 0 0 22.650004
addressable-merge (click) 283867 247477 27 896 0 0% 0 0 21.55901
addressable-new (click) 261039 231248 21 591 0 0% 0 0 14.617296
addressable-normalize (click) 314563 256679 43 1329 1 0% 0 0 32.078332
addressable-parse (click) 282093 255550 26 880 0 0% 0 0 21.20412
addressable-setters (click) 259741 190749 20 582 0 0% 0 0 14.236941
addressable-to-s (click) 281113 245603 26 849 0 0% 0 0 20.30588
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.927465
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.18878
erubi (click) 249134 222377 6 134 0 0% 0 0 3.87301
etanni (click) 32731 34499 8 114 0 0% 0 0 3.460551
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.97879
fluentd (click) 489748 462055 7 116 0 0% 0 0 3.789358
gcbench (click) 15808 8981 9 110 0 0% 0 0 3.585749
graphql (click) 411877 383509 73 1909 19 0% 0 0 52.066231
graphql-native (click) 355221 299833 39 532 0 0% 0 0 14.050583
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.879169
lee (click) 319701 287366 49 1099 0 0% 0 0 31.179801
matmul (click) 11103 4709 8 136 0 0% 0 0 4.204833
nbody (click) 14448 21176 6 251 0 0% 0 0 6.19987
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.291634
optcarrot (click) 319416 277986 188 4589 34 0% 0 0 108.03758
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 72.540982
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 43.201264
rack (click) 285583 252853 35 581 0 0% 0 0 14.856655
ruby-json (click) 19699 17751 8 206 0 0% 0 0 5.700398
rubyboy (click) 707856 625113 154 6871 42 0% 0 0 165.31914
rubykon (click) 149667 148880 138 2117 4 0% 0 0 55.492035
splay (click) 34953 22682 9 175 0 0% 0 0 5.190235
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.889574
tinygql (click) 302725 256335 59 1031 5 0% 0 0 26.697647
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1882.119767
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 474.533526
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.129236
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.629199
fib (click) 2659 2995 3 30 0 0% 0 0 1.099475
getivar (click) 3789 6778 3 79 0 0% 0 0 2.029875
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.356109
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.830378
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.940644
object-new (click) 2406 2818 2 36 0 0% 0 0 1.145933
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.352916
object-new-no-escape (click) 4540 5102 5 68 0 0% 0 0 2.011535
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.180971
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.77724
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.813689
send_cfunc_block (click) 13777 10257 5 192 0 0% 0 0 3.764547
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.507378
setivar (click) 2783 3726 3 46 0 0% 0 0 1.271299
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.399553
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.72152
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.551419
structaref (click) 4407 9095 3 88 0 0% 0 0 2.425682
structaset (click) 4113 5834 3 70 0 0% 0 0 1.821847
throw (click) 5953 4624 5 53 0 0% 0 0 1.805316

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.