Ruby Benchmarks

Details for Benchmarks at 2026-08-15 00:33:46 UTC

YJIT metrics from the ruby-bench suite using Ruby 3349f4107d.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 98.8% faster than CRuby 4.1.0dev
  • 8.4% faster than YJIT 3.4.7
On railsbench it is
  • 116.2% faster than CRuby 4.1.0dev
  • 18.0% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 6 minutes
aarch64 runtime: 7 hours, 47 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 201 50 230
chunky-png 5 31 5 33 50 33 50 27
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 420 5 447 50 618 50 674
liquid-compile 5 419 5 516 50 581 50 837
liquid-il 5 67 5 69 50 116 50 134
liquid-render 5 173 5 173 50 430 50 470
lobsters 5 20 5 20 50 10 50 10
mail 5 193 5 212 50 254 50 298
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 159 50 246 50 254
ruby-lsp 5 163 5 164 50 239 50 230
sequel 5 423 5 462 50 572 50 661
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 29 50 12 50 18
addressable-getters 5 165 5 172 50 183 50 214
addressable-join 5 74 5 85 50 66 50 85
addressable-merge 5 160 5 162 50 222 50 247
addressable-new 5 352 5 361 50 519 50 554
addressable-normalize 5 52 5 58 50 60 50 71
addressable-parse 5 103 5 109 50 104 50 122
addressable-setters 5 184 5 195 50 232 50 261
addressable-to-s 5 164 5 175 50 181 50 212
binarytrees 5 82 5 93 50 136 50 145
blurhash 5 84 5 87 50 145 50 145
erubi 5 135 5 159 50 132 50 161
etanni 5 101 5 83 50 72 50 49
fannkuchredux 5 55 5 56 50 100 50 113
fluentd 5 62 5 71 50 21 50 34
gcbench 5 10 5 11 50 10 50 17
graphql 5 372 5 472 50 569 50 977
graphql-native 5 58 5 89 50 22 50 69
knucleotide 5 162 5 154 50 117 50 109
lee 5 23 5 33 50 10 50 21
matmul 5 53 5 51 50 88 50 96
nbody 5 250 5 255 50 661 50 648
nqueens 5 119 5 126 50 555 50 598
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 174 5 185 50 696 50 810
protoboeuf-encode 5 201 5 205 50 794 50 746
rack 5 444 5 474 50 703 50 787
ruby-json 5 84 5 116 50 50 50 93
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 23 50 10 50 10
splay 5 208 5 213 50 246 50 244
string_malloc_pressure 5 146 5 32 50 102 50 10
sudoku 5 48 5 49 50 155 50 171
tinygql 5 41 5 44 50 40 50 56
30k_ifelse 5 28 5 28 50 185 50 184
30k_methods 5 38 5 39 50 450 50 451
attr_accessor 5 156 5 212 50 1833 50 1942
cfunc_itself 5 348 5 347 50 1255 50 1258
fib 5 125 5 143 50 939 50 904
getivar 5 210 5 340 50 2314 50 2441
getivar-module 5 103 5 148 50 89 50 127
keyword_args 5 102 5 107 50 1239 50 1243
loops-times 5 23 5 26 50 63 50 60
object-new 5 268 5 487 50 297 50 1520
object-new-initialize 5 168 5 262 50 260 50 1028
object-new-no-escape 5 81 5 146 50 89 50 531
respond_to 5 139 5 125 50 3905 50 3890
ruby-xor 5 247 5 253 50 1305 50 1315
send_bmethod 5 118 5 122 50 5538 50 4528
send_cfunc_block 5 106 5 106 50 306 50 303
send_rubyfunc_block 5 196 5 205 50 1372 50 1375
send_rubyfunc_inline 5 30 5 36 50 298 50 297
setivar 5 359 5 349 50 4930 50 4924
setivar_object 5 341 5 287 50 765 50 643
setivar_young 5 342 5 287 50 809 50 663
str_concat 5 391 5 426 50 1195 50 915
structaref 5 153 5 201 50 1799 50 1894
structaset 5 198 5 259 50 370 50 485
throw 5 1109 5 1438 50 1444 50 1889

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) 1564288 1411179 204 2682 0 0% 0 0 78.722736
chunky-png (click) 322307 280876 79 1376 1 0% 0 0 38.114653
erubi-rails (click) 1379206 1257896 268 3626 23 0% 0 0 93.598309
hexapdf (click) 1527373 1298450 593 15741 45 0% 0 0 430.27585
liquid-c (click) 559824 497296 113 2224 5 0% 0 0 61.775852
liquid-compile (click) 459309 405595 146 2666 2 0% 0 0 73.628895
liquid-il (click) 610480 546392 70 2722 0 0% 0 0 79.170945
liquid-render (click) 667408 598070 130 2946 8 0% 0 0 76.786711
lobsters (click) 8550052 7183438 3125 63314 125 0% 0 0 2018.325279
mail (click) 867973 861550 345 7716 40 0% 0 0 207.809229
psych-load (click) 287010 240334 60 829 2 0% 0 0 22.932314
railsbench (click) 3353098 3062021 1591 19736 105 0% 0 0 537.011899
rubocop (click) 5762004 4997327 3000 57024 133 0% 6 0 1615.90666
ruby-lsp (click) 1048479 912877 408 7449 47 0% 1 0 199.783042
sequel (click) 521902 487348 11 119 0 0% 0 0 4.58281
shipit (click) 6884468 5698704 3136 50015 147 0% 0 0 1582.964791
addressable-equality (click) 323619 308759 44 1381 1 0% 0 0 33.31877
addressable-getters (click) 280653 272155 26 863 0 0% 0 0 19.955586
addressable-join (click) 289394 252050 24 941 0 0% 0 0 22.710365
addressable-merge (click) 288460 277548 27 896 0 0% 0 0 21.225756
addressable-new (click) 261007 239846 21 563 0 0% 0 0 13.36402
addressable-normalize (click) 318977 262772 43 1327 1 0% 0 0 31.879526
addressable-parse (click) 285649 276467 26 880 0 0% 0 0 20.9909
addressable-setters (click) 264451 229821 20 582 0 0% 0 0 14.140829
addressable-to-s (click) 283510 250611 26 849 0 0% 0 0 20.033096
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.773606
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.844719
erubi (click) 243618 217139 6 134 0 0% 0 0 3.91613
etanni (click) 29494 22579 8 114 0 0% 0 0 3.401666
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.841703
fluentd (click) 512142 424780 7 116 0 0% 0 0 3.645913
gcbench (click) 15640 8771 9 110 0 0% 0 0 3.440665
graphql (click) 415076 380135 74 1940 18 0% 0 0 52.786735
graphql-native (click) 357154 294731 39 532 0 0% 0 0 13.56089
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.75085
lee (click) 319250 280395 50 1102 0 0% 0 0 30.303192
matmul (click) 11103 4709 8 136 0 0% 0 0 4.092767
nbody (click) 14448 21176 6 251 0 0% 0 0 6.125533
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.238101
optcarrot (click) 321897 302848 188 4600 34 0% 0 0 106.740002
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.243944
protoboeuf-encode (click) 242247 233890 14 1820 0 0% 0 0 41.976479
rack (click) 285482 278901 35 581 0 0% 0 0 14.612246
ruby-json (click) 19522 17429 8 210 0 0% 0 0 5.839149
rubyboy (click) 705496 639804 154 6875 42 0% 0 0 163.087237
rubykon (click) 146630 137068 137 2078 3 0% 0 0 54.69981
splay (click) 34617 22483 9 175 0 0% 0 0 5.682379
string_malloc_pressure (click) 4071 3932 6 49 0 0% 0 0 1.831555
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.751956
tinygql (click) 302454 265981 59 1026 5 0% 0 0 26.659866
30k_ifelse (click) 6265365 5037717 9260 76309 0 0% 0 0 1868.19126
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 475.410344
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.069914
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.483302
fib (click) 2659 2995 3 30 0 0% 0 0 1.135429
getivar (click) 3789 6778 3 79 0 0% 0 0 1.91408
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.321816
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.811609
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.940501
object-new (click) 2406 2818 2 36 0 0% 0 0 0.971602
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.316845
object-new-no-escape (click) 4295 4675 5 63 0 0% 0 0 1.715642
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.115724
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.807435
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.803307
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.287733
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.761321
send_rubyfunc_inline (click) 5654 403 2 35 0 0% 0 0 1.115826
setivar (click) 2783 3726 3 46 0 0% 0 0 1.254218
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.370308
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.704451
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.416446
structaref (click) 4407 9095 3 88 0 0% 0 0 2.328692
structaset (click) 4113 5834 3 70 0 0% 0 0 1.782123
throw (click) 5953 4624 5 53 0 0% 0 0 1.776034

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.