Ruby Benchmarks

Details for Benchmarks at 2026-08-28 03:25:41 UTC

YJIT metrics from the ruby-bench suite using Ruby 7dec7a2aa3.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 97.3% faster than CRuby 4.1.0dev
  • 8.3% faster than YJIT 3.4.7
On railsbench it is
  • 111.5% faster than CRuby 4.1.0dev
  • 13.9% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 60 minutes
aarch64 runtime: 7 hours, 43 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 96 50 201 50 222
chunky-png 5 32 5 32 50 33 50 28
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 423 5 448 50 619 50 676
liquid-compile 5 421 5 521 50 578 50 843
liquid-il 5 67 5 69 50 117 50 133
liquid-render 5 170 5 177 50 432 50 468
lobsters 5 20 5 21 50 10 50 10
mail 5 194 5 210 50 254 50 293
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 155 5 157 50 247 50 246
ruby-lsp 5 159 5 164 50 218 50 229
sequel 5 430 5 459 50 597 50 652
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 29 50 12 50 18
addressable-getters 5 164 5 176 50 184 50 210
addressable-join 5 75 5 87 50 66 50 83
addressable-merge 5 162 5 164 50 222 50 239
addressable-new 5 353 5 357 50 517 50 531
addressable-normalize 5 53 5 58 50 60 50 71
addressable-parse 5 104 5 108 50 104 50 119
addressable-setters 5 185 5 193 50 233 50 252
addressable-to-s 5 165 5 175 50 183 50 209
binarytrees 5 82 5 91 50 136 50 172
blurhash 5 84 5 87 50 145 50 144
erubi 5 140 5 148 50 138 50 144
etanni 5 100 5 79 50 72 50 46
fannkuchredux 5 55 5 57 50 100 50 114
fluentd 5 64 5 72 50 20 50 42
gcbench 5 10 5 11 50 10 50 17
graphql 5 372 5 478 50 531 50 973
graphql-native 5 58 5 89 50 21 50 67
knucleotide 5 163 5 149 50 118 50 102
lee 5 23 5 33 50 10 50 20
matmul 5 53 5 57 50 87 50 100
nbody 5 250 5 277 50 663 50 615
nqueens 5 119 5 128 50 554 50 595
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 190 50 696 50 781
protoboeuf-encode 5 200 5 210 50 796 50 806
rack 5 447 5 452 50 713 50 746
ruby-json 5 84 5 113 50 51 50 89
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 21 50 10 50 10
splay 5 209 5 224 50 250 50 275
string_malloc_pressure 5 148 5 32 50 103 50 10
sudoku 5 48 5 50 50 155 50 174
tinygql 5 42 5 44 50 35 50 56
30k_ifelse 5 28 5 28 50 186 50 185
30k_methods 5 39 5 39 50 456 50 455
attr_accessor 5 157 5 201 50 1834 50 1925
cfunc_itself 5 348 5 359 50 1255 50 1258
fib 5 124 5 140 50 939 50 940
getivar 5 216 5 323 50 2317 50 2430
getivar-module 5 103 5 139 50 88 50 120
keyword_args 5 102 5 98 50 1240 50 1242
loops-times 5 23 5 26 50 63 50 62
object-new 5 268 5 671 50 296 50 1577
object-new-initialize 5 169 5 273 50 259 50 1022
object-new-no-escape 5 81 5 153 50 89 50 549
respond_to 5 139 5 130 50 3908 50 3906
ruby-xor 5 247 5 257 50 1305 50 1301
send_bmethod 5 118 5 124 50 5539 50 4527
send_cfunc_block 5 107 5 111 50 305 50 282
send_rubyfunc_block 5 195 5 211 50 1372 50 1375
send_rubyfunc_inline 5 30 5 37 50 297 50 298
setivar 5 359 5 350 50 4930 50 4924
setivar_object 5 341 5 288 50 762 50 784
setivar_young 5 341 5 287 50 808 50 822
str_concat 5 392 5 423 50 1195 50 957
structaref 5 153 5 188 50 1798 50 1875
structaset 5 199 5 250 50 370 50 497
throw 5 1113 5 1405 50 1445 50 1875

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) 1552177 1288994 203 2617 0 0% 0 0 72.435654
chunky-png (click) 322631 258452 79 1378 1 0% 0 0 38.093743
erubi-rails (click) 1376548 1136046 268 3636 23 0% 0 0 99.47797
hexapdf (click) 1523834 1299316 593 15772 45 0% 0 0 431.321564
liquid-c (click) 561403 501444 113 2227 5 0% 0 0 61.465668
liquid-compile (click) 477041 395804 146 2677 2 0% 0 0 72.967046
liquid-il (click) 614134 527780 70 2733 0 0% 0 0 79.178367
liquid-render (click) 667682 600277 130 2949 8 0% 0 0 77.361509
lobsters (click) 8532693 7075160 3126 63378 125 0% 0 0 2019.282671
mail (click) 870510 834849 345 7750 40 0% 0 0 207.226505
psych-load (click) 283320 278662 60 836 2 0% 0 0 23.135942
railsbench (click) 3349686 2831668 1591 19816 105 0% 0 0 568.279644
rubocop (click) 5755811 4995054 3000 57136 133 0% 6 0 1613.568942
ruby-lsp (click) 1046922 939318 408 7486 47 0% 1 0 199.501839
sequel (click) 497127 422448 11 119 0 0% 0 0 4.326591
shipit (click) 6886187 5822261 3137 50469 147 0% 0 0 1606.559379
addressable-equality (click) 324579 310774 44 1382 1 0% 0 0 33.315135
addressable-getters (click) 284884 278232 26 863 0 0% 0 0 20.460162
addressable-join (click) 290042 262017 24 941 0 0% 0 0 23.129856
addressable-merge (click) 271423 242038 27 896 0 0% 0 0 21.020447
addressable-new (click) 265243 254131 21 564 0 0% 0 0 13.630744
addressable-normalize (click) 319932 313934 43 1328 1 0% 0 0 31.235821
addressable-parse (click) 283606 242614 26 880 0 0% 0 0 20.689623
addressable-setters (click) 263398 221108 20 582 0 0% 0 0 13.626355
addressable-to-s (click) 280516 223402 26 849 0 0% 0 0 19.709051
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.73518
blurhash (click) 52211 43340 27 606 0 0% 0 0 17.779803
erubi (click) 242426 217066 6 135 0 0% 0 0 3.835006
etanni (click) 30080 23270 8 114 0 0% 0 0 3.465479
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.834969
fluentd (click) 510505 431967 7 116 0 0% 0 0 3.650448
gcbench (click) 15503 8804 9 111 0 0% 0 0 3.433295
graphql (click) 396425 351232 74 1944 17 0% 0 0 52.873077
graphql-native (click) 354726 310039 39 532 0 0% 0 0 13.581825
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.738118
lee (click) 318482 256474 50 1107 0 0% 0 0 30.329786
matmul (click) 11076 4720 8 137 0 0% 0 0 4.069467
nbody (click) 14448 21176 6 251 0 0% 0 0 6.095619
nqueens (click) 22523 12434 5 390 0 0% 0 0 10.22174
optcarrot (click) 321897 302848 188 4600 34 0% 0 0 106.254568
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.401741
protoboeuf-encode (click) 242247 233890 14 1820 0 0% 0 0 42.298451
rack (click) 266995 216347 35 581 0 0% 0 0 15.177964
ruby-json (click) 20081 18131 8 211 0 0% 0 0 5.860696
rubyboy (click) 669107 639969 154 6525 42 0% 0 0 162.555139
rubykon (click) 146467 153511 137 2080 3 0% 0 0 54.171594
splay (click) 34536 22516 9 175 0 0% 0 0 5.138612
string_malloc_pressure (click) 4044 3947 6 50 0 0% 0 0 1.760146
sudoku (click) 51585 74062 7 873 0 0% 0 0 22.865286
tinygql (click) 298333 262855 59 1041 5 0% 0 0 26.373122
30k_ifelse (click) 6265365 5037717 9260 76309 0 0% 0 0 1855.946289
30k_methods (click) 2278060 1643077 5780 19371 0 0% 0 0 475.584258
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.04931
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.503113
fib (click) 2659 2995 3 30 0 0% 0 0 1.081575
getivar (click) 3789 6778 3 79 0 0% 0 0 1.9097
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.283217
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.783112
loops-times (click) 7066 8398 5 100 0 0% 0 0 2.968825
object-new (click) 2352 2825 2 38 0 0% 0 0 0.977549
object-new-initialize (click) 2988 3280 4 44 0 0% 0 0 1.312561
object-new-no-escape (click) 4240 4697 5 64 0 0% 0 0 1.765461
respond_to (click) 6370 6822 4 81 0 0% 0 0 2.113305
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.7759
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.802356
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.273014
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.752346
send_rubyfunc_inline (click) 5654 403 2 35 0 0% 0 0 1.065709
setivar (click) 2783 3726 3 46 0 0% 0 0 1.237094
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.395891
setivar_young (click) 4273 4878 4 64 0 0% 0 0 1.7302
str_concat (click) 5772 6980 6 83 0 0% 0 0 2.413692
structaref (click) 4407 9095 3 88 0 0% 0 0 2.311224
structaset (click) 4113 5834 3 70 0 0% 0 0 1.738993
throw (click) 5953 4624 5 53 0 0% 0 0 1.772908

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.