Ruby Benchmarks

Details for Benchmarks at 2026-05-12 01:10:09 UTC

YJIT metrics from the ruby-bench suite using Ruby 24a1b097ce.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 96.9% faster than CRuby 4.1.0dev
  • 8.1% faster than YJIT 3.4.7
On railsbench it is
  • 114.3% faster than CRuby 4.1.0dev
  • 15.0% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 60 minutes
aarch64 runtime: 7 hours, 49 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 93 50 199 50 226
chunky-png 5 32 5 31 50 34 50 26
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 425 5 440 50 625 50 664
liquid-compile 5 407 5 485 50 542 50 761
liquid-render 5 171 5 173 50 430 50 460
lobsters 5 20 5 20 50 10 50 10
mail 5 193 5 202 50 255 50 288
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 153 5 158 50 247 50 254
ruby-lsp 5 163 5 163 50 240 50 232
sequel 5 420 5 455 50 598 50 637
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 27 50 12 50 12
addressable-getters 5 164 5 166 50 183 50 199
addressable-join 5 74 5 77 50 66 50 73
addressable-merge 5 161 5 150 50 223 50 221
addressable-new 5 351 5 336 50 519 50 524
addressable-normalize 5 53 5 54 50 60 50 60
addressable-parse 5 103 5 103 50 103 50 111
addressable-setters 5 185 5 173 50 233 50 230
addressable-to-s 5 164 5 165 50 181 50 198
binarytrees 5 82 5 87 50 136 50 167
blurhash 5 84 5 84 50 145 50 145
erubi 5 129 5 150 50 122 50 151
etanni 5 101 5 80 50 72 50 48
fannkuchredux 5 55 5 57 50 100 50 104
fluentd 5 58 5 65 50 21 50 31
gcbench 5 10 5 10 50 10 50 16
graphql 5 371 5 442 50 570 50 949
graphql-native 5 57 5 87 50 21 50 70
knucleotide 5 164 5 144 50 118 50 98
lee 5 23 5 30 50 10 50 17
matmul 5 53 5 56 50 88 50 90
nbody 5 250 5 278 50 663 50 703
nqueens 5 119 5 124 50 554 50 590
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 184 50 697 50 818
protoboeuf-encode 5 201 5 200 50 808 50 793
rack 5 438 5 453 50 720 50 756
ruby-json 5 84 5 106 50 50 50 84
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 11
splay 5 209 5 220 50 250 50 280
sudoku 5 48 5 50 50 155 50 156
tinygql 5 39 5 41 50 36 50 53
30k_ifelse 5 28 5 28 50 186 50 185
30k_methods 5 38 5 39 50 457 50 447
attr_accessor 5 157 5 174 50 1833 50 1878
cfunc_itself 5 347 5 314 50 1255 50 1259
fib 5 125 5 136 50 939 50 939
getivar 5 210 5 304 50 2314 50 2415
getivar-module 5 103 5 130 50 89 50 221
keyword_args 5 102 5 99 50 1240 50 1243
loops-times 5 23 5 26 50 63 50 62
object-new 5 268 5 468 50 297 50 1498
object-new-initialize 5 169 5 233 50 260 50 1023
object-new-no-escape 5 81 5 138 50 89 50 513
respond_to 5 139 5 126 50 3901 50 3900
ruby-xor 5 246 5 236 50 1305 50 1297
send_bmethod 5 118 5 115 50 5539 50 4526
send_cfunc_block 5 106 5 106 50 305 50 310
send_rubyfunc_block 5 195 5 202 50 1372 50 1376
setivar 5 359 5 368 50 4930 50 4945
setivar_object 5 341 5 295 50 764 50 596
setivar_young 5 341 5 295 50 810 50 609
str_concat 5 390 5 463 50 1201 50 1169
structaref 5 153 5 169 50 1760 50 1837
structaset 5 198 5 231 50 370 50 481
throw 5 1107 5 1415 50 1442 50 1933

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) 1560304 1330647 203 2660 0 0% 0 0 73.612384
chunky-png (click) 325097 307262 79 1376 1 0% 0 0 37.909121
erubi-rails (click) 1383343 1243528 268 3626 23 0% 0 0 92.704513
hexapdf (click) 1525458 1335000 593 15791 44 0% 0 0 429.449421
liquid-c (click) 566385 485658 114 2240 5 0% 0 0 58.660934
liquid-compile (click) 489487 454911 146 2771 2 0% 0 0 83.716287
liquid-render (click) 672693 625387 131 2963 8 0% 0 0 77.295317
lobsters (click) 8573315 7118668 3125 63563 124 0% 0 0 2024.599446
mail (click) 876495 892108 345 7738 40 0% 0 0 207.908178
psych-load (click) 282722 232593 61 833 2 0% 0 0 23.248882
railsbench (click) 3360457 3015813 1592 19784 104 0% 0 0 535.864216
rubocop (click) 5790418 5055083 3002 57186 127 0% 6 0 1647.621173
ruby-lsp (click) 1047043 933105 409 7472 47 0% 1 0 197.959229
sequel (click) 508227 418703 11 119 0 0% 0 0 5.189226
shipit (click) 7064049 5937072 3176 51588 154 0% 0 0 1633.691065
addressable-equality (click) 321431 272212 44 1380 1 0% 0 0 36.30032
addressable-getters (click) 281769 247947 26 863 0 0% 0 0 20.834611
addressable-join (click) 285190 254310 24 945 0 0% 0 0 27.847991
addressable-merge (click) 287494 259359 27 900 0 0% 0 0 24.97643
addressable-new (click) 262529 248859 21 569 0 0% 0 0 14.415914
addressable-normalize (click) 316559 291597 43 1327 1 0% 0 0 33.234571
addressable-parse (click) 285005 258554 26 886 0 0% 0 0 23.383473
addressable-setters (click) 262194 250590 20 582 0 0% 0 0 15.247333
addressable-to-s (click) 281097 238481 26 849 0 0% 0 0 21.09955
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.74497
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.735156
erubi (click) 251671 208367 6 134 0 0% 0 0 3.899266
etanni (click) 32989 26478 8 114 0 0% 0 0 3.407478
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.771472
fluentd (click) 492236 423320 7 116 0 0% 0 0 3.555026
gcbench (click) 15808 8981 9 110 0 0% 0 0 3.578452
graphql (click) 415285 370301 73 1931 19 0% 0 0 52.342055
graphql-native (click) 358645 303134 39 532 0 0% 0 0 13.675854
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.689738
lee (click) 321482 305491 49 1093 0 0% 0 0 30.230884
matmul (click) 11103 4709 8 136 0 0% 0 0 4.044917
nbody (click) 14448 21176 6 251 0 0% 0 0 6.148765
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.159092
optcarrot (click) 321739 302768 188 4597 34 0% 0 0 106.176062
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.651915
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 43.329796
rack (click) 292130 244859 35 656 0 0% 0 0 17.588223
ruby-json (click) 19699 17751 8 206 0 0% 0 0 5.683263
rubyboy (click) 708873 609366 154 6871 42 0% 0 0 162.295929
rubykon (click) 148271 147165 138 2099 4 0% 0 0 55.05892
splay (click) 34953 22682 9 175 0 0% 0 0 5.218916
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.810247
tinygql (click) 304373 274325 59 1026 5 0% 0 0 26.383054
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1867.682794
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 472.82308
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.086796
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.517205
fib (click) 2659 2995 3 30 0 0% 0 0 1.110604
getivar (click) 3789 6778 3 79 0 0% 0 0 1.927584
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.338995
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.764128
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.888533
object-new (click) 2406 2818 2 36 0 0% 0 0 1.004102
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.312997
object-new-no-escape (click) 4540 5102 5 68 0 0% 0 0 1.977495
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.083331
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.773133
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.779397
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.300087
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.72998
setivar (click) 2783 3726 3 46 0 0% 0 0 1.225742
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.411081
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.735583
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.45337
structaref (click) 4407 9095 3 88 0 0% 0 0 2.342551
structaset (click) 4113 5834 3 70 0 0% 0 0 1.76796
throw (click) 5953 4624 5 53 0 0% 0 0 1.752226

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.