Ruby Benchmarks

Details for Benchmarks at 2026-08-07 01:30:36 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 95.8% faster than CRuby 4.1.0dev
  • 7.5% faster than YJIT 3.4.7
On railsbench it is
  • 114.0% faster than CRuby 4.1.0dev
  • 15.9% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 8 minutes
aarch64 runtime: 7 hours, 50 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 98 50 202 50 217
chunky-png 5 32 5 31 50 34 50 28
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 421 5 443 50 631 50 661
liquid-compile 5 420 5 513 50 582 50 824
liquid-il 5 67 5 68 50 116 50 123
liquid-render 5 172 5 171 50 431 50 461
lobsters 5 20 5 21 50 10 50 10
mail 5 194 5 208 50 254 50 292
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 155 50 248 50 242
ruby-lsp 5 157 5 160 50 211 50 221
sequel 5 429 5 464 50 584 50 664
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 30 50 12 50 17
addressable-getters 5 165 5 174 50 184 50 206
addressable-join 5 73 5 86 50 64 50 82
addressable-merge 5 161 5 161 50 222 50 233
addressable-new 5 352 5 349 50 519 50 525
addressable-normalize 5 52 5 59 50 60 50 70
addressable-parse 5 104 5 107 50 105 50 117
addressable-setters 5 183 5 185 50 233 50 251
addressable-to-s 5 165 5 172 50 182 50 208
binarytrees 5 81 5 90 50 136 50 181
blurhash 5 84 5 84 50 145 50 145
erubi 5 141 5 152 50 125 50 158
etanni 5 100 5 81 50 72 50 48
fannkuchredux 5 55 5 56 50 100 50 112
fluentd 5 62 5 66 50 21 50 26
gcbench 5 10 5 10 50 10 50 10
graphql 5 371 5 453 50 562 50 880
graphql-native 5 58 5 88 50 21 50 59
knucleotide 5 163 5 150 50 117 50 104
lee 5 23 5 31 50 10 50 19
matmul 5 53 5 51 50 87 50 99
nbody 5 249 5 248 50 663 50 629
nqueens 5 119 5 128 50 554 50 596
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 181 50 696 50 677
protoboeuf-encode 5 200 5 200 50 793 50 807
rack 5 447 5 480 50 704 50 795
ruby-json 5 84 5 113 50 51 50 91
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 209 5 200 50 250 50 241
string_malloc_pressure 5 145 5 33 50 102 50 10
sudoku 5 48 5 50 50 155 50 174
tinygql 5 40 5 42 50 38 50 50
30k_ifelse 5 28 5 28 50 186 50 185
30k_methods 5 38 5 39 50 458 50 455
attr_accessor 5 157 5 174 50 1834 50 1863
cfunc_itself 5 348 5 333 50 1255 50 1258
fib 5 125 5 135 50 939 50 938
getivar 5 211 5 316 50 2315 50 2426
getivar-module 5 103 5 144 50 89 50 124
keyword_args 5 96 5 106 50 1240 50 1243
loops-times 5 23 5 26 50 63 50 62
object-new 5 268 5 481 50 298 50 1473
object-new-initialize 5 166 5 254 50 260 50 517
object-new-no-escape 5 80 5 141 50 89 50 365
respond_to 5 139 5 121 50 3907 50 3901
ruby-xor 5 247 5 241 50 1305 50 1300
send_bmethod 5 118 5 114 50 5539 50 4526
send_cfunc_block 5 106 5 105 50 302 50 307
send_rubyfunc_block 5 196 5 210 50 1372 50 1375
send_rubyfunc_inline 5 30 5 36 50 298 50 298
setivar 5 359 5 350 50 4929 50 4925
setivar_object 5 341 5 264 50 763 50 718
setivar_young 5 341 5 264 50 805 50 736
str_concat 5 391 5 420 50 1195 50 1017
structaref 5 153 5 180 50 1800 50 1858
structaset 5 198 5 221 50 368 50 478
throw 5 1109 5 1328 50 1443 50 1721

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) 1553994 1371970 203 2596 0 0% 0 0 70.401027
chunky-png (click) 319836 295454 79 1372 1 0% 0 0 38.252018
erubi-rails (click) 1380847 1164683 268 3630 23 0% 0 0 93.326039
hexapdf (click) 1524215 1288657 594 15685 45 0% 0 0 422.629242
liquid-c (click) 559066 451087 114 2226 5 0% 0 0 57.696905
liquid-compile (click) 477061 429440 146 2679 2 0% 0 0 72.38485
liquid-il (click) 605022 523854 70 2720 0 0% 0 0 79.086531
liquid-render (click) 664869 589995 131 2945 8 0% 0 0 77.193773
lobsters (click) 8549225 7257453 3127 63271 125 0% 0 0 2014.122655
mail (click) 862155 866295 345 7654 40 0% 0 0 204.012199
psych-load (click) 276463 262854 60 820 2 0% 0 0 22.469586
railsbench (click) 3357396 2986469 1591 19740 105 0% 0 0 532.11544
rubocop (click) 5761577 4948230 3000 57024 133 0% 6 0 1613.097488
ruby-lsp (click) 1045174 948882 408 7425 47 0% 1 0 195.32525
sequel (click) 522141 463787 11 119 0 0% 0 0 4.16368
shipit (click) 6880404 5928215 3136 49969 147 0% 0 0 1592.805873
addressable-equality (click) 319930 288594 44 1381 1 0% 0 0 32.545602
addressable-getters (click) 281339 240695 26 863 0 0% 0 0 20.093354
addressable-join (click) 288741 251432 24 941 0 0% 0 0 22.882644
addressable-merge (click) 289732 255655 27 896 0 0% 0 0 21.321438
addressable-new (click) 264568 228558 21 563 0 0% 0 0 13.691064
addressable-normalize (click) 319289 263790 43 1327 1 0% 0 0 31.712856
addressable-parse (click) 282925 216978 26 880 0 0% 0 0 20.572521
addressable-setters (click) 264763 222647 20 582 0 0% 0 0 13.901309
addressable-to-s (click) 265090 212677 26 849 0 0% 0 0 19.699689
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.758484
blurhash (click) 52495 43786 27 607 0 0% 0 0 18.19642
erubi (click) 239977 229908 6 134 0 0% 0 0 3.913837
etanni (click) 33079 34728 8 114 0 0% 0 0 3.373887
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.843232
fluentd (click) 513001 459389 7 116 0 0% 0 0 3.59928
gcbench (click) 15893 8734 9 110 0 0% 0 0 3.475203
graphql (click) 411569 361422 74 1939 18 0% 0 0 52.14458
graphql-native (click) 358648 340224 39 532 0 0% 0 0 13.308526
knucleotide (click) 9961 2328 7 110 0 0% 0 0 4.741547
lee (click) 319241 289261 50 1101 0 0% 0 0 30.250618
matmul (click) 11103 4709 8 136 0 0% 0 0 4.141216
nbody (click) 14448 21176 6 251 0 0% 0 0 6.108821
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.186633
optcarrot (click) 321897 302848 188 4600 34 0% 0 0 106.558574
protoboeuf (click) 175400 243898 12 2904 0 0% 0 0 74.174075
protoboeuf-encode (click) 247853 316926 14 1820 0 0% 0 0 42.322329
rack (click) 281488 266524 35 581 0 0% 0 0 14.526811
ruby-json (click) 19849 17818 8 210 0 0% 0 0 5.687921
rubyboy (click) 709705 594666 154 6875 42 0% 0 0 162.542307
rubykon (click) 146721 137257 137 2078 3 0% 0 0 54.00819
splay (click) 34682 14303 9 175 0 0% 0 0 5.272498
string_malloc_pressure (click) 4071 3932 6 49 0 0% 0 0 1.760414
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.778886
tinygql (click) 299262 238540 59 1024 5 0% 0 0 25.982535
30k_ifelse (click) 6265365 5037717 9260 76309 0 0% 0 0 1862.63674
30k_methods (click) 2278130 1643075 5780 19370 0 0% 0 0 471.686369
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.073846
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.518654
fib (click) 2659 2995 3 30 0 0% 0 0 1.100705
getivar (click) 3789 6778 3 79 0 0% 0 0 1.992148
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.290277
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.82534
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.952403
object-new (click) 2406 2818 2 36 0 0% 0 0 0.987152
object-new-initialize (click) 3156 3352 4 43 0 0% 0 0 1.315902
object-new-no-escape (click) 4285 4620 5 63 0 0% 0 0 1.757758
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.186725
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.754011
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.784969
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.31638
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.73927
send_rubyfunc_inline (click) 5654 403 2 35 0 0% 0 0 1.086626
setivar (click) 2783 3726 3 46 0 0% 0 0 1.272632
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.42772
setivar_young (click) 4441 4926 4 63 0 0% 0 0 1.797445
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.492485
structaref (click) 4407 9095 3 88 0 0% 0 0 2.333653
structaset (click) 4113 5834 3 70 0 0% 0 0 1.751743
throw (click) 5953 4624 5 53 0 0% 0 0 1.763459

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.