Ruby Benchmarks

Details for Benchmarks at 2026-07-18 00:51:19 UTC

YJIT metrics from the ruby-bench suite using Ruby 84a27934cf.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 94.5% faster than CRuby 4.1.0dev
  • 4.5% faster than YJIT 3.4.7
On railsbench it is
  • 108.8% faster than CRuby 4.1.0dev
  • 10.0% 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 93 5 95 50 205 50 208
chunky-png 5 32 5 30 50 34 50 25
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 424 5 442 50 619 50 665
liquid-compile 5 417 5 519 50 584 50 831
liquid-il 5 67 5 69 50 116 50 124
liquid-render 5 172 5 172 50 431 50 463
lobsters 5 20 5 21 50 10 50 10
mail 5 194 5 207 50 253 50 290
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 246 50 238
ruby-lsp 5 153 5 159 50 239 50 217
sequel 5 429 5 467 50 598 50 664
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 29 50 12 50 17
addressable-getters 5 165 5 170 50 183 50 203
addressable-join 5 74 5 85 50 66 50 77
addressable-merge 5 161 5 157 50 222 50 230
addressable-new 5 349 5 342 50 521 50 504
addressable-normalize 5 53 5 58 50 60 50 69
addressable-parse 5 104 5 106 50 103 50 114
addressable-setters 5 185 5 185 50 234 50 247
addressable-to-s 5 163 5 170 50 183 50 201
binarytrees 5 82 5 88 50 136 50 170
blurhash 5 83 5 84 50 145 50 145
erubi 5 129 5 153 50 139 50 157
etanni 5 100 5 81 50 72 50 48
fannkuchredux 5 55 5 58 50 101 50 112
fluentd 5 61 5 62 50 20 50 30
gcbench 5 10 5 10 50 10 50 10
graphql 5 368 5 453 50 571 50 902
graphql-native 5 59 5 87 50 22 50 57
knucleotide 5 163 5 143 50 118 50 97
lee 5 22 5 31 50 10 50 18
matmul 5 53 5 52 50 88 50 94
nbody 5 246 5 251 50 663 50 687
nqueens 5 119 5 122 50 554 50 605
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 180 50 697 50 693
protoboeuf-encode 5 201 5 201 50 804 50 804
rack 5 445 5 461 50 705 50 749
ruby-json 5 84 5 114 50 50 50 91
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 208 5 236 50 250 50 230
string_malloc_pressure 5 146 5 34 50 101 50 10
sudoku 5 48 5 50 50 155 50 163
tinygql 5 42 5 43 50 40 50 50
30k_ifelse 5 28 5 28 50 185 50 186
30k_methods 5 38 5 39 50 457 50 457
attr_accessor 5 157 5 161 50 1833 50 1841
cfunc_itself 5 347 5 328 50 1255 50 1258
fib 5 125 5 135 50 939 50 939
getivar 5 210 5 300 50 2305 50 2411
getivar-module 5 103 5 137 50 89 50 131
keyword_args 5 102 5 96 50 1240 50 1243
loops-times 5 23 5 26 50 63 50 63
object-new 5 268 5 481 50 299 50 1535
object-new-initialize 5 167 5 256 50 259 50 528
object-new-no-escape 5 80 5 139 50 89 50 370
respond_to 5 139 5 127 50 3902 50 3901
ruby-xor 5 247 5 234 50 1305 50 1313
send_bmethod 5 118 5 114 50 5539 50 4526
send_cfunc_block 5 107 5 102 50 306 50 291
send_rubyfunc_block 5 196 5 212 50 1372 50 1375
send_rubyfunc_inline 5 30 5 36 50 297 50 297
setivar 5 359 5 349 50 4929 50 4924
setivar_object 5 341 5 271 50 763 50 585
setivar_young 5 341 5 270 50 809 50 579
str_concat 5 391 5 426 50 1201 50 1062
structaref 5 153 5 166 50 1799 50 1827
structaset 5 198 5 233 50 370 50 490
throw 5 1108 5 1331 50 1442 50 1719

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) 1563185 1321323 204 2663 0 0% 0 0 74.859582
chunky-png (click) 321514 271779 79 1372 1 0% 0 0 38.243378
erubi-rails (click) 1384005 1134801 268 3630 23 0% 0 0 93.909194
hexapdf (click) 1528644 1301115 593 15682 44 0% 0 0 422.115553
liquid-c (click) 562878 503440 114 2224 5 0% 0 0 58.432378
liquid-compile (click) 480180 424310 146 2679 2 0% 0 0 72.973242
liquid-il (click) 616550 552839 70 2720 0 0% 0 0 79.910494
liquid-render (click) 671743 613673 131 2943 8 0% 0 0 76.940427
lobsters (click) 8541839 7234901 3126 63206 125 0% 0 0 2039.979756
mail (click) 869415 808224 345 7654 40 0% 0 0 206.128159
psych-load (click) 286598 256840 60 820 2 0% 0 0 23.017787
railsbench (click) 3362544 2927115 1592 19737 105 0% 0 0 535.294742
rubocop (click) 5770201 4979325 3001 57005 129 0% 6 0 1718.406369
ruby-lsp (click) 1047983 820429 408 7414 47 0% 1 0 196.491066
sequel (click) 511483 424010 11 119 0 0% 0 0 3.809204
shipit (click) 6857493 5782977 3136 49920 147 0% 0 0 1604.050608
addressable-equality (click) 325862 311072 44 1381 1 0% 0 0 33.695378
addressable-getters (click) 284509 252001 26 863 0 0% 0 0 20.408238
addressable-join (click) 291916 254571 24 941 0 0% 0 0 23.297125
addressable-merge (click) 291658 240561 27 896 0 0% 0 0 21.387472
addressable-new (click) 264868 219697 21 563 0 0% 0 0 13.700122
addressable-normalize (click) 317801 252588 43 1327 1 0% 0 0 31.076815
addressable-parse (click) 288857 231264 26 880 0 0% 0 0 21.082979
addressable-setters (click) 263275 219637 20 582 0 0% 0 0 13.874412
addressable-to-s (click) 285748 244727 26 849 0 0% 0 0 20.031868
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.782899
blurhash (click) 52495 43786 27 607 0 0% 0 0 17.985236
erubi (click) 248796 214188 6 134 0 0% 0 0 3.939108
etanni (click) 32989 26478 8 114 0 0% 0 0 3.440586
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.797478
fluentd (click) 517811 447321 7 116 0 0% 0 0 3.654968
gcbench (click) 15893 8734 9 110 0 0% 0 0 3.536798
graphql (click) 417243 391646 74 1939 19 0% 0 0 52.858268
graphql-native (click) 362093 310283 39 532 0 0% 0 0 13.667438
knucleotide (click) 9961 2328 7 110 0 0% 0 0 4.636906
lee (click) 322410 308243 50 1101 0 0% 0 0 30.551738
matmul (click) 11103 4709 8 136 0 0% 0 0 4.079322
nbody (click) 14448 21176 6 251 0 0% 0 0 6.139889
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.279681
optcarrot (click) 321859 302768 188 4597 34 0% 0 0 106.880214
protoboeuf (click) 175400 243898 12 2904 0 0% 0 0 74.341548
protoboeuf-encode (click) 247853 316926 14 1820 0 0% 0 0 42.455644
rack (click) 288613 241169 35 581 0 0% 0 0 14.559411
ruby-json (click) 19699 17751 8 206 0 0% 0 0 5.692713
rubyboy (click) 713258 605969 154 6871 42 0% 0 0 162.585815
rubykon (click) 146721 137257 137 2078 3 0% 0 0 54.652356
splay (click) 34682 14303 9 175 0 0% 0 0 5.518873
string_malloc_pressure (click) 4071 3932 6 49 0 0% 0 0 1.733518
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.934921
tinygql (click) 304354 268277 59 1024 5 0% 0 0 25.95518
30k_ifelse (click) 6265365 5037717 9260 76309 0 0% 0 0 1877.966921
30k_methods (click) 2278130 1643075 5780 19370 0 0% 0 0 476.135092
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.102671
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.497759
fib (click) 2659 2995 3 30 0 0% 0 0 1.091758
getivar (click) 3789 6778 3 79 0 0% 0 0 1.943067
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.385735
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.803088
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.92588
object-new (click) 2406 2818 2 36 0 0% 0 0 1.001572
object-new-initialize (click) 3156 3352 4 43 0 0% 0 0 1.329637
object-new-no-escape (click) 4285 4620 5 63 0 0% 0 0 1.691808
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.140919
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.767178
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.803315
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.283241
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.737901
send_rubyfunc_inline (click) 5654 403 2 35 0 0% 0 0 1.068585
setivar (click) 2783 3726 3 46 0 0% 0 0 1.287341
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.409307
setivar_young (click) 4441 4926 4 63 0 0% 0 0 1.732415
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.492319
structaref (click) 4407 9095 3 88 0 0% 0 0 2.355471
structaset (click) 4113 5834 3 70 0 0% 0 0 1.797232
throw (click) 5953 4624 5 53 0 0% 0 0 1.741182

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.