Ruby Benchmarks

Details for Benchmarks at 2026-08-16 00:33:51 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 98.5% faster than CRuby 4.1.0dev
  • 7.4% faster than YJIT 3.4.7
On railsbench it is
  • 115.8% faster than CRuby 4.1.0dev
  • 12.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 91 5 95 50 202 50 227
chunky-png 5 32 5 32 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 421 5 440 50 619 50 666
liquid-compile 5 419 5 519 50 582 50 839
liquid-il 5 67 5 69 50 116 50 133
liquid-render 5 170 5 173 50 434 50 467
lobsters 5 20 5 21 50 10 50 10
mail 5 194 5 212 50 253 50 299
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 158 50 246 50 245
ruby-lsp 5 153 5 164 50 239 50 231
sequel 5 420 5 463 50 598 50 660
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 30 50 12 50 18
addressable-getters 5 165 5 177 50 184 50 212
addressable-join 5 74 5 87 50 66 50 84
addressable-merge 5 161 5 162 50 222 50 248
addressable-new 5 352 5 363 50 516 50 554
addressable-normalize 5 53 5 59 50 61 50 71
addressable-parse 5 103 5 109 50 104 50 120
addressable-setters 5 184 5 194 50 233 50 261
addressable-to-s 5 164 5 176 50 183 50 213
binarytrees 5 82 5 93 50 136 50 145
blurhash 5 84 5 86 50 145 50 145
erubi 5 138 5 157 50 138 50 155
etanni 5 100 5 81 50 72 50 47
fannkuchredux 5 55 5 56 50 101 50 113
fluentd 5 58 5 66 50 21 50 34
gcbench 5 10 5 11 50 10 50 17
graphql 5 374 5 469 50 565 50 987
graphql-native 5 58 5 89 50 21 50 69
knucleotide 5 163 5 155 50 117 50 107
lee 5 23 5 33 50 10 50 20
matmul 5 53 5 51 50 88 50 97
nbody 5 250 5 257 50 663 50 637
nqueens 5 119 5 126 50 554 50 599
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 184 50 696 50 818
protoboeuf-encode 5 201 5 207 50 791 50 773
rack 5 441 5 453 50 708 50 730
ruby-json 5 84 5 117 50 51 50 93
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 23 50 10 50 10
splay 5 209 5 215 50 250 50 243
string_malloc_pressure 5 147 5 32 50 101 50 10
sudoku 5 48 5 50 50 155 50 171
tinygql 5 41 5 45 50 39 50 56
30k_ifelse 5 28 5 28 50 185 50 184
30k_methods 5 38 5 39 50 450 50 455
attr_accessor 5 157 5 190 50 1833 50 1911
cfunc_itself 5 349 5 363 50 1255 50 1258
fib 5 124 5 145 50 939 50 939
getivar 5 216 5 311 50 2305 50 2421
getivar-module 5 103 5 137 50 88 50 125
keyword_args 5 102 5 107 50 1240 50 1243
loops-times 5 23 5 26 50 63 50 61
object-new 5 268 5 489 50 296 50 1525
object-new-initialize 5 169 5 263 50 259 50 1028
object-new-no-escape 5 81 5 146 50 89 50 543
respond_to 5 139 5 125 50 3907 50 3903
ruby-xor 5 247 5 250 50 1306 50 1315
send_bmethod 5 118 5 123 50 5539 50 4527
send_cfunc_block 5 107 5 105 50 306 50 303
send_rubyfunc_block 5 196 5 205 50 1372 50 1375
send_rubyfunc_inline 5 30 5 36 50 297 50 297
setivar 5 359 5 349 50 4930 50 4922
setivar_object 5 341 5 287 50 765 50 641
setivar_young 5 341 5 287 50 807 50 662
str_concat 5 391 5 427 50 1194 50 930
structaref 5 153 5 191 50 1800 50 1877
structaset 5 198 5 266 50 369 50 489
throw 5 1110 5 1437 50 1444 50 1881

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) 1562630 1425817 204 2668 0 0% 0 0 78.011538
chunky-png (click) 323272 274340 79 1376 1 0% 0 0 38.19472
erubi-rails (click) 1379892 1202000 268 3626 23 0% 0 0 99.225453
hexapdf (click) 1528467 1316744 594 15744 45 0% 0 0 423.772214
liquid-c (click) 558843 505007 113 2224 5 0% 0 0 61.530002
liquid-compile (click) 466469 421520 146 2666 2 0% 0 0 72.887084
liquid-il (click) 611683 531748 70 2723 0 0% 0 0 79.954189
liquid-render (click) 667129 622438 130 2946 8 0% 0 0 76.911631
lobsters (click) 8542031 7160901 3126 63237 125 0% 0 0 2021.969896
mail (click) 870889 775231 345 7716 40 0% 0 0 207.244852
psych-load (click) 287975 282970 60 829 2 0% 0 0 23.037862
railsbench (click) 3353098 3070233 1591 19736 105 0% 0 0 533.315698
rubocop (click) 5762600 5015146 3000 57026 132 0% 6 0 1614.45259
ruby-lsp (click) 1049431 939107 408 7449 47 0% 1 0 198.80221
sequel (click) 522716 472397 11 119 0 0% 0 0 4.221351
shipit (click) 6878332 5732847 3136 49934 147 0% 0 0 1581.815468
addressable-equality (click) 323340 259379 44 1381 1 0% 0 0 33.040236
addressable-getters (click) 283623 235045 26 863 0 0% 0 0 19.865409
addressable-join (click) 288817 251506 24 941 0 0% 0 0 22.32305
addressable-merge (click) 277978 231656 27 896 0 0% 0 0 21.058349
addressable-new (click) 264251 243924 21 563 0 0% 0 0 13.473937
addressable-normalize (click) 318977 262772 43 1327 1 0% 0 0 31.86795
addressable-parse (click) 286614 253527 26 880 0 0% 0 0 20.874711
addressable-setters (click) 264446 246200 20 582 0 0% 0 0 13.614249
addressable-to-s (click) 283444 225977 26 849 0 0% 0 0 20.032151
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.766295
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.80859
erubi (click) 244926 202736 6 134 0 0% 0 0 3.959744
etanni (click) 30080 23270 8 114 0 0% 0 0 3.434717
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.776693
fluentd (click) 512142 424812 7 116 0 0% 0 0 3.571807
gcbench (click) 15640 8771 9 110 0 0% 0 0 3.435102
graphql (click) 415076 380135 74 1940 18 0% 0 0 52.287918
graphql-native (click) 358207 312820 39 532 0 0% 0 0 13.658919
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.652885
lee (click) 319316 313221 50 1102 0 0% 0 0 30.532502
matmul (click) 11103 4709 8 136 0 0% 0 0 4.101141
nbody (click) 14448 21176 6 251 0 0% 0 0 6.142699
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.205635
optcarrot (click) 321897 302848 188 4600 34 0% 0 0 107.111495
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 70.993601
protoboeuf-encode (click) 242247 233890 14 1820 0 0% 0 0 42.186934
rack (click) 285482 278933 35 581 0 0% 0 0 14.686513
ruby-json (click) 20108 18120 8 210 0 0% 0 0 5.729202
rubyboy (click) 705496 639804 154 6875 42 0% 0 0 163.039367
rubykon (click) 146630 137068 137 2078 3 0% 0 0 54.416449
splay (click) 34617 22483 9 175 0 0% 0 0 5.262308
string_malloc_pressure (click) 4071 3932 6 49 0 0% 0 0 1.775314
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.779452
tinygql (click) 302175 249389 59 1026 5 0% 0 0 25.913813
30k_ifelse (click) 6265365 5037717 9260 76309 0 0% 0 0 1872.374725
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 474.561734
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.068631
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.495122
fib (click) 2659 2995 3 30 0 0% 0 0 1.103322
getivar (click) 3789 6778 3 79 0 0% 0 0 1.897227
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.325221
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.818377
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.867187
object-new (click) 2406 2818 2 36 0 0% 0 0 0.997278
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.305207
object-new-no-escape (click) 4295 4675 5 63 0 0% 0 0 1.743252
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.118251
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.845892
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.810242
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.299819
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.703308
send_rubyfunc_inline (click) 5654 403 2 35 0 0% 0 0 1.060436
setivar (click) 2783 3726 3 46 0 0% 0 0 1.246948
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.416534
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.714334
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.441224
structaref (click) 4407 9095 3 88 0 0% 0 0 2.312169
structaset (click) 4113 5834 3 70 0 0% 0 0 1.770219
throw (click) 5953 4624 5 53 0 0% 0 0 1.796534

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.