Ruby Benchmarks

Details for Benchmarks at 2026-01-09 00:43:42 UTC

YJIT metrics from the ruby-bench suite using Ruby b3216bc1e1.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 96.2% faster than CRuby 4.1.0dev
  • 4.8% faster than YJIT 3.4.7
On railsbench it is
  • 113.4% faster than CRuby 4.1.0dev
  • 10.8% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 19 minutes
aarch64 runtime: 7 hours, 12 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 199 50 234
chunky-png 5 31 5 32 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 421 5 423 50 625 50 633
liquid-compile 5 416 5 472 50 547 50 713
liquid-render 5 172 5 174 50 436 50 437
mail 5 195 5 192 50 253 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 156 50 247 50 252
ruby-lsp 5 159 5 161 50 223 50 230
sequel 5 425 5 427 50 604 50 592
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 27 50 11 50 10
addressable-getters 5 164 5 167 50 183 50 198
addressable-join 5 72 5 76 50 66 50 69
addressable-merge 5 160 5 155 50 222 50 216
addressable-new 5 354 5 349 50 525 50 519
addressable-normalize 5 53 5 53 50 59 50 58
addressable-parse 5 103 5 103 50 103 50 110
addressable-setters 5 183 5 178 50 229 50 229
addressable-to-s 5 163 5 167 50 182 50 193
binarytrees 5 82 5 82 50 136 50 127
blurhash 5 83 5 87 50 143 50 145
erubi 5 137 5 140 50 134 50 151
etanni 5 97 5 68 50 71 50 35
fannkuchredux 5 54 5 57 50 102 50 105
fluentd 5 56 5 61 50 20 50 32
graphql 5 371 5 459 50 561 50 918
graphql-native 5 59 5 77 50 23 50 66
knucleotide 5 163 5 155 50 118 50 108
lee 5 23 5 23 50 10 50 10
matmul 5 51 5 54 50 94 50 96
nbody 5 247 5 278 50 677 50 705
nqueens 5 116 5 129 50 556 50 592
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 187 50 706 50 750
protoboeuf-encode 5 197 5 204 50 836 50 807
rack 5 441 5 444 50 705 50 687
ruby-json 5 82 5 98 50 46 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 157 50 164
tinygql 5 40 5 43 50 39 50 49
30k_ifelse 5 28 5 28 50 184 50 183
30k_methods 5 38 5 41 50 457 50 446
attr_accessor 5 157 5 190 50 1836 50 1908
cfunc_itself 5 349 5 345 50 1254 50 1259
fib 5 124 5 141 50 940 50 940
getivar 5 217 5 304 50 2317 50 2429
getivar-module 5 104 5 138 50 90 50 268
keyword_args 5 99 5 106 50 1239 50 1242
loops-times 5 23 5 25 50 64 50 61
object-new 5 268 5 367 50 298 50 688
respond_to 5 139 5 138 50 3891 50 3905
ruby-xor 5 236 5 244 50 1315 50 1290
send_bmethod 5 116 5 124 50 5539 50 4527
send_cfunc_block 5 106 5 105 50 353 50 340
send_rubyfunc_block 5 251 5 244 50 6924 50 6922
setivar 5 360 5 471 50 4927 50 5036
setivar_object 5 341 5 303 50 752 50 639
setivar_young 5 341 5 306 50 798 50 660
str_concat 5 391 5 449 50 1199 50 1189
structaref 5 157 5 188 50 1813 50 1877
structaset 5 203 5 248 50 398 50 507
throw 5 1087 5 1272 50 1421 50 1549

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) 1545105 1297409 203 2638 0 0% 0 0 76.750925
chunky-png (click) 320434 295748 79 1373 1 0% 0 0 39.236279
erubi-rails (click) 1365136 1134078 269 3635 22 0% 0 0 97.840205
hexapdf (click) 1521125 1369285 594 15662 44 0% 0 0 438.271322
liquid-c (click) 556399 471599 114 2228 5 0% 0 0 59.399682
liquid-compile (click) 478586 389776 146 2694 2 0% 0 0 78.122322
liquid-render (click) 662533 611322 131 2946 8 0% 0 0 79.449055
mail (click) 866693 820298 345 7721 40 0% 0 0 213.406629
psych-load (click) 288196 257578 61 828 2 0% 0 0 23.8088
railsbench (click) 3338836 2892396 1591 19684 97 0% 0 0 555.50675
rubocop (click) 5756394 5075034 3002 56845 125 0% 6 0 1665.580447
ruby-lsp (click) 1036217 904138 408 7384 47 0% 1 0 205.189033
sequel (click) 502774 422861 11 119 0 0% 0 0 4.13731
shipit (click) 7127426 5901487 3299 51983 170 0% 0 0 1741.155805
addressable-equality (click) 317919 278307 44 1407 1 0% 0 0 35.546603
addressable-getters (click) 277324 219658 26 863 0 0% 0 0 21.152549
addressable-join (click) 282171 203260 24 941 0 0% 0 0 23.577823
addressable-merge (click) 282363 197837 27 898 0 0% 0 0 22.718212
addressable-new (click) 259028 205452 21 591 0 0% 0 0 14.929798
addressable-normalize (click) 312760 280336 43 1330 1 0% 0 0 33.228339
addressable-parse (click) 280041 237917 26 880 0 0% 0 0 21.929973
addressable-setters (click) 257755 214114 20 582 0 0% 0 0 14.614569
addressable-to-s (click) 283914 226635 26 971 0 0% 0 0 23.353622
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.833793
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.105701
erubi (click) 248114 223333 6 134 0 0% 0 0 3.924908
etanni (click) 33287 36246 8 113 0 0% 0 0 3.537139
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.074776
fluentd (click) 483022 415879 7 115 0 0% 0 0 3.773156
graphql (click) 412463 370809 73 1921 19 0% 0 0 54.629647
graphql-native (click) 354811 328024 39 532 0 0% 0 0 14.008411
knucleotide (click) 9997 11103 7 113 0 0% 0 0 6.96207
lee (click) 317271 263162 49 1094 0 0% 0 0 31.406529
matmul (click) 11103 4709 8 136 0 0% 0 0 4.23976
nbody (click) 14448 21176 6 251 0 0% 0 0 6.155036
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.402089
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 111.789768
protoboeuf (click) 169555 177006 12 2829 0 0% 0 0 72.762004
protoboeuf-encode (click) 242967 283659 14 1815 0 0% 0 0 44.776484
rack (click) 284264 270032 35 626 0 0% 0 0 16.615416
ruby-json (click) 20323 18532 8 206 0 0% 0 0 5.80799
rubyboy (click) 704123 630364 154 6864 42 0% 0 0 167.134306
rubykon (click) 147221 147074 137 2084 3 0% 0 0 56.573269
sudoku (click) 51704 65882 7 870 0 0% 0 0 23.327589
tinygql (click) 301764 264338 59 1037 5 0% 0 0 27.747104
30k_ifelse (click) 6222887 5052688 9260 75477 0 0% 0 0 1943.317757
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 494.225985
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.075918
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.544012
fib (click) 2659 2995 3 30 0 0% 0 0 1.137507
getivar (click) 3789 6778 3 79 0 0% 0 0 1.958281
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.302032
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.830345
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.955329
object-new (click) 2406 2818 2 36 0 0% 0 0 1.066267
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.148788
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.86494
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.848768
send_cfunc_block (click) 14429 12201 5 192 0 0% 0 0 4.161316
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.488088
setivar (click) 2783 3726 3 46 0 0% 0 0 1.2997
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.400918
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.690804
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.440173
structaref (click) 4407 9095 3 88 0 0% 0 0 2.333891
structaset (click) 3926 5614 3 70 0 0% 0 0 1.740826
throw (click) 5953 4624 5 53 0 0% 0 0 1.839759

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.