Ruby Benchmarks

Details for Benchmarks at 2026-07-19 00:56:54 UTC

YJIT metrics from the ruby-bench suite using Ruby 7802cdbecd.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 94.4% faster than CRuby 4.1.0dev
  • 5.8% faster than YJIT 3.4.7
On railsbench it is
  • 109.9% faster than CRuby 4.1.0dev
  • 9.5% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 9 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 94 5 96 50 192 50 210
chunky-png 5 32 5 30 50 33 50 24
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 420 5 443 50 616 50 666
liquid-compile 5 417 5 515 50 579 50 834
liquid-il 5 66 5 68 50 116 50 124
liquid-render 5 170 5 171 50 435 50 461
lobsters 5 20 5 21 50 10 50 10
mail 5 193 5 207 50 253 50 288
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 247 50 236
ruby-lsp 5 159 5 161 50 220 50 224
sequel 5 425 5 465 50 592 50 658
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 29 50 12 50 17
addressable-getters 5 164 5 169 50 183 50 201
addressable-join 5 74 5 83 50 66 50 78
addressable-merge 5 160 5 158 50 221 50 226
addressable-new 5 351 5 338 50 514 50 499
addressable-normalize 5 53 5 58 50 60 50 68
addressable-parse 5 104 5 105 50 104 50 113
addressable-setters 5 184 5 184 50 234 50 246
addressable-to-s 5 164 5 168 50 182 50 202
binarytrees 5 82 5 88 50 136 50 163
blurhash 5 84 5 84 50 145 50 145
erubi 5 140 5 153 50 141 50 157
etanni 5 99 5 81 50 72 50 47
fannkuchredux 5 55 5 58 50 96 50 113
fluentd 5 55 5 61 50 20 50 29
gcbench 5 10 5 10 50 10 50 10
graphql 5 368 5 454 50 567 50 898
graphql-native 5 57 5 88 50 20 50 57
knucleotide 5 163 5 144 50 117 50 97
lee 5 23 5 31 50 10 50 19
matmul 5 53 5 52 50 88 50 99
nbody 5 250 5 251 50 661 50 691
nqueens 5 119 5 120 50 554 50 604
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 182 50 697 50 696
protoboeuf-encode 5 201 5 203 50 803 50 807
rack 5 444 5 450 50 709 50 747
ruby-json 5 84 5 114 50 50 50 92
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 208 5 201 50 250 50 233
string_malloc_pressure 5 146 5 36 50 103 50 10
sudoku 5 48 5 50 50 155 50 163
tinygql 5 41 5 43 50 40 50 51
30k_ifelse 5 28 5 28 50 186 50 185
30k_methods 5 38 5 40 50 456 50 454
attr_accessor 5 157 5 160 50 1832 50 1844
cfunc_itself 5 347 5 297 50 1255 50 1258
fib 5 125 5 135 50 939 50 939
getivar 5 211 5 299 50 2316 50 2407
getivar-module 5 103 5 136 50 89 50 131
keyword_args 5 102 5 97 50 1240 50 1243
loops-times 5 23 5 26 50 63 50 63
object-new 5 268 5 480 50 297 50 1525
object-new-initialize 5 169 5 256 50 259 50 527
object-new-no-escape 5 81 5 140 50 89 50 367
respond_to 5 139 5 127 50 3893 50 3899
ruby-xor 5 247 5 236 50 1305 50 1313
send_bmethod 5 118 5 114 50 5539 50 4525
send_cfunc_block 5 106 5 102 50 303 50 291
send_rubyfunc_block 5 196 5 212 50 1372 50 1375
send_rubyfunc_inline 5 30 5 36 50 298 50 298
setivar 5 359 5 349 50 4930 50 4923
setivar_object 5 341 5 271 50 765 50 582
setivar_young 5 341 5 271 50 809 50 580
str_concat 5 390 5 424 50 1201 50 1069
structaref 5 153 5 166 50 1800 50 1831
structaset 5 198 5 235 50 368 50 489
throw 5 1110 5 1333 50 1440 50 1730

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) 1561948 1343127 204 2674 0 0% 0 0 75.235786
chunky-png (click) 325207 317247 79 1372 1 0% 0 0 38.255099
erubi-rails (click) 1384005 1151141 268 3630 23 0% 0 0 94.08846
hexapdf (click) 1528343 1325471 593 15682 44 0% 0 0 425.947284
liquid-c (click) 562599 470444 114 2224 5 0% 0 0 58.685276
liquid-compile (click) 481179 400636 146 2679 2 0% 0 0 72.849387
liquid-il (click) 609906 559659 70 2721 0 0% 0 0 84.125876
liquid-render (click) 671464 597041 131 2943 8 0% 0 0 77.014008
lobsters (click) 8525983 7173561 3126 62975 125 0% 0 0 2034.143069
mail (click) 869701 808437 345 7654 40 0% 0 0 205.410751
psych-load (click) 290287 228575 60 820 2 0% 0 0 23.428299
railsbench (click) 3362698 2918704 1592 19739 105 0% 0 0 542.333877
rubocop (click) 5769922 4995531 3001 57005 129 0% 6 0 1715.302185
ruby-lsp (click) 1048493 943994 408 7414 47 0% 1 0 196.621837
sequel (click) 502549 461430 11 119 0 0% 0 0 3.910322
shipit (click) 7050250 5967013 3190 51648 164 0% 0 0 1664.808528
addressable-equality (click) 323035 274857 44 1381 1 0% 0 0 33.682283
addressable-getters (click) 283318 217755 26 863 0 0% 0 0 20.406346
addressable-join (click) 291916 254571 24 941 0 0% 0 0 23.147335
addressable-merge (click) 290746 239271 27 896 0 0% 0 0 21.493166
addressable-new (click) 266778 246445 21 563 0 0% 0 0 13.642682
addressable-normalize (click) 312097 261112 43 1327 1 0% 0 0 31.440231
addressable-parse (click) 289136 247856 26 880 0 0% 0 0 21.334359
addressable-setters (click) 266968 224145 20 582 0 0% 0 0 14.218114
addressable-to-s (click) 286032 244940 26 849 0 0% 0 0 20.155251
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.8052
blurhash (click) 52495 43786 27 607 0 0% 0 0 17.88497
erubi (click) 252205 210271 6 134 0 0% 0 0 3.844742
etanni (click) 32989 26478 8 114 0 0% 0 0 3.422496
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.836158
fluentd (click) 518932 456656 7 116 0 0% 0 0 3.581988
gcbench (click) 15893 8734 9 110 0 0% 0 0 3.527926
graphql (click) 419153 369182 74 1939 19 0% 0 0 52.974027
graphql-native (click) 362372 310511 39 532 0 0% 0 0 13.372293
knucleotide (click) 9961 2328 7 110 0 0% 0 0 4.752289
lee (click) 322689 300279 50 1101 0 0% 0 0 30.338804
matmul (click) 11103 4709 8 136 0 0% 0 0 4.095872
nbody (click) 14448 21176 6 251 0 0% 0 0 6.096087
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.231856
optcarrot (click) 321859 302768 188 4597 34 0% 0 0 107.095238
protoboeuf (click) 175400 243898 12 2904 0 0% 0 0 74.075768
protoboeuf-encode (click) 247853 316926 14 1820 0 0% 0 0 42.42681
rack (click) 288893 241397 35 581 0 0% 0 0 14.519269
ruby-json (click) 19699 17751 8 206 0 0% 0 0 5.727429
rubyboy (click) 713258 605969 154 6871 42 0% 0 0 163.309156
rubykon (click) 146721 137257 137 2078 3 0% 0 0 54.266375
splay (click) 34682 14303 9 175 0 0% 0 0 5.328348
string_malloc_pressure (click) 4071 3932 6 49 0 0% 0 0 1.749161
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.864929
tinygql (click) 304638 284909 59 1024 5 0% 0 0 26.07005
30k_ifelse (click) 6265365 5037717 9260 76309 0 0% 0 0 1873.273956
30k_methods (click) 2278130 1643075 5780 19370 0 0% 0 0 477.326835
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.087632
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.492557
fib (click) 2659 2995 3 30 0 0% 0 0 1.11007
getivar (click) 3789 6778 3 79 0 0% 0 0 1.960506
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.327604
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.799748
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.919545
object-new (click) 2406 2818 2 36 0 0% 0 0 0.976937
object-new-initialize (click) 3156 3352 4 43 0 0% 0 0 1.305636
object-new-no-escape (click) 4285 4620 5 63 0 0% 0 0 1.762501
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.121964
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.78978
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.810648
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.26099
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.729249
send_rubyfunc_inline (click) 5654 403 2 35 0 0% 0 0 1.047794
setivar (click) 2783 3726 3 46 0 0% 0 0 1.242599
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.385923
setivar_young (click) 4441 4926 4 63 0 0% 0 0 1.727016
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.502818
structaref (click) 4407 9095 3 88 0 0% 0 0 2.362578
structaset (click) 4113 5834 3 70 0 0% 0 0 1.771992
throw (click) 5953 4624 5 53 0 0% 0 0 1.780171

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.