Ruby Benchmarks

Details for Benchmarks at 2026-04-15 01:04:43 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 97.8% faster than CRuby 4.1.0dev
  • 8.5% faster than YJIT 3.4.7
On railsbench it is
  • 117.0% faster than CRuby 4.1.0dev
  • 15.2% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 3 minutes
aarch64 runtime: 7 hours, 51 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 92 5 95 50 200 50 237
chunky-png 5 32 5 31 50 34 50 27
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 424 5 437 50 623 50 663
liquid-compile 5 418 5 484 50 581 50 752
liquid-render 5 173 5 171 50 434 50 452
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 198 50 252 50 285
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 155 5 155 50 246 50 246
ruby-lsp 5 153 5 165 50 223 50 229
sequel 5 429 5 453 50 579 50 627
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 27 50 12 50 12
addressable-getters 5 165 5 166 50 183 50 196
addressable-join 5 74 5 79 50 66 50 71
addressable-merge 5 161 5 152 50 223 50 222
addressable-new 5 356 5 343 50 521 50 532
addressable-normalize 5 53 5 54 50 60 50 59
addressable-parse 5 104 5 103 50 103 50 110
addressable-setters 5 185 5 175 50 234 50 232
addressable-to-s 5 163 5 166 50 182 50 195
binarytrees 5 81 5 85 50 136 50 143
blurhash 5 83 5 84 50 145 50 145
erubi 5 138 5 156 50 138 50 158
etanni 5 100 5 81 50 72 50 47
fannkuchredux 5 55 5 56 50 101 50 103
fluentd 5 61 5 57 50 21 50 27
gcbench 5 10 5 10 50 10 50 15
graphql 5 370 5 456 50 573 50 945
graphql-native 5 58 5 89 50 21 50 70
knucleotide 5 163 5 144 50 118 50 97
lee 5 22 5 29 50 10 50 13
matmul 5 53 5 58 50 88 50 96
nbody 5 250 5 283 50 663 50 704
nqueens 5 119 5 119 50 553 50 579
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 173 5 172 50 698 50 789
protoboeuf-encode 5 201 5 191 50 803 50 796
rack 5 443 5 448 50 712 50 727
ruby-json 5 84 5 106 50 50 50 82
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 208 5 223 50 250 50 283
sudoku 5 48 5 49 50 155 50 160
tinygql 5 41 5 42 50 35 50 51
30k_ifelse 5 28 5 28 50 186 50 184
30k_methods 5 38 5 39 50 458 50 457
attr_accessor 5 157 5 178 50 1832 50 1888
cfunc_itself 5 348 5 317 50 1255 50 1259
fib 5 125 5 133 50 939 50 939
getivar 5 210 5 307 50 2306 50 2418
getivar-module 5 103 5 137 50 89 50 268
keyword_args 5 102 5 103 50 1240 50 1243
loops-times 5 23 5 25 50 63 50 62
object-new 5 268 5 471 50 297 50 1514
object-new-initialize 5 169 5 253 50 260 50 1018
object-new-no-escape 5 81 5 133 50 89 50 518
respond_to 5 139 5 131 50 3905 50 3900
ruby-xor 5 247 5 235 50 1305 50 1310
send_bmethod 5 118 5 104 50 5539 50 4526
send_cfunc_block 5 105 5 107 50 309 50 311
send_rubyfunc_block 5 195 5 203 50 1371 50 1376
setivar 5 359 5 469 50 4930 50 5036
setivar_object 5 345 5 348 50 766 50 662
setivar_young 5 341 5 347 50 809 50 692
str_concat 5 391 5 460 50 1207 50 1173
structaref 5 153 5 158 50 1800 50 1869
structaset 5 198 5 214 50 370 50 475
throw 5 1108 5 1381 50 1445 50 1788

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) 1554712 1326052 202 2599 0 0% 0 0 71.404234
chunky-png (click) 305845 259609 79 1376 1 0% 0 0 38.349947
erubi-rails (click) 1379621 1279526 268 3654 23 0% 0 0 95.300642
hexapdf (click) 1518203 1268631 594 15807 44 0% 0 0 428.593517
liquid-c (click) 563953 531734 114 2240 5 0% 0 0 58.970605
liquid-compile (click) 477682 408173 146 2745 2 0% 0 0 82.835647
liquid-render (click) 672279 633085 131 2963 8 0% 0 0 77.728727
lobsters (click) 8594894 7195928 3127 63918 122 0% 0 0 2053.374878
mail (click) 874574 840342 345 7738 40 0% 0 0 208.993638
psych-load (click) 291167 250378 61 833 2 0% 0 0 23.367399
railsbench (click) 3360513 2794779 1592 19744 104 0% 0 0 535.562731
rubocop (click) 5786203 5097373 3002 57193 128 0% 6 0 1626.578098
ruby-lsp (click) 1037129 872051 409 7472 47 0% 1 0 200.316317
sequel (click) 505980 456791 11 121 0 0% 0 0 4.512947
shipit (click) 6912651 5891366 3137 50323 147 0% 0 0 1620.276177
addressable-equality (click) 303414 258365 44 1380 1 0% 0 0 35.97449
addressable-getters (click) 282294 248492 26 869 0 0% 0 0 22.160854
addressable-join (click) 287137 240056 24 941 0 0% 0 0 26.631717
addressable-merge (click) 268535 212027 27 900 0 0% 0 0 23.794173
addressable-new (click) 262529 248859 21 569 0 0% 0 0 14.545582
addressable-normalize (click) 317644 292799 43 1341 1 0% 0 0 33.731763
addressable-parse (click) 280758 228650 26 880 0 0% 0 0 23.638747
addressable-setters (click) 262194 250590 20 582 0 0% 0 0 16.12345
addressable-to-s (click) 281740 247235 26 853 0 0% 0 0 22.305437
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.71245
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.813366
erubi (click) 251950 200403 6 134 0 0% 0 0 3.963845
etanni (click) 32752 34339 8 114 0 0% 0 0 3.449879
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.869711
fluentd (click) 490199 412778 7 116 0 0% 0 0 3.574066
gcbench (click) 15808 8981 9 110 0 0% 0 0 3.580249
graphql (click) 412789 391766 73 1931 19 0% 0 0 52.740291
graphql-native (click) 358182 327137 39 532 0 0% 0 0 13.788704
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.701347
lee (click) 321778 272972 49 1099 0 0% 0 0 30.36761
matmul (click) 11103 4709 8 136 0 0% 0 0 4.080234
nbody (click) 14448 21176 6 251 0 0% 0 0 6.136972
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.248751
optcarrot (click) 321739 302768 188 4597 34 0% 0 0 106.927573
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 72.083837
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 43.478969
rack (click) 286534 221392 35 628 0 0% 0 0 16.4013
ruby-json (click) 19462 17420 8 206 0 0% 0 0 5.778208
rubyboy (click) 699164 638568 154 6873 42 0% 0 0 164.031124
rubykon (click) 148777 155950 138 2107 4 0% 0 0 55.305604
splay (click) 34953 22682 9 175 0 0% 0 0 5.182522
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.955585
tinygql (click) 304951 274898 59 1032 5 0% 0 0 26.818342
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1866.472029
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 473.556868
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.094736
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.484348
fib (click) 2659 2995 3 30 0 0% 0 0 1.102877
getivar (click) 3789 6778 3 79 0 0% 0 0 1.928046
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.343331
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.806865
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.887921
object-new (click) 2406 2818 2 36 0 0% 0 0 0.9945
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.291131
object-new-no-escape (click) 4540 5102 5 68 0 0% 0 0 1.968414
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.153531
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.803181
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.824935
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.273311
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.783179
setivar (click) 2783 3726 3 46 0 0% 0 0 1.254195
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.391579
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.732259
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.474328
structaref (click) 4407 9095 3 88 0 0% 0 0 2.325155
structaset (click) 4113 5834 3 70 0 0% 0 0 1.798282
throw (click) 5953 4624 5 53 0 0% 0 0 1.754232

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.