Ruby Benchmarks

Details for Benchmarks at 2026-08-01 00:58:16 UTC

YJIT metrics from the ruby-bench suite using Ruby 384c0fd832.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 95.4% faster than CRuby 4.1.0dev
  • 5.8% faster than YJIT 3.4.7
On railsbench it is
  • 113.5% faster than CRuby 4.1.0dev
  • 15.1% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 8 minutes
aarch64 runtime: 7 hours, 50 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 98 50 199 50 198
chunky-png 5 32 5 31 50 34 50 27
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 425 5 440 50 620 50 668
liquid-compile 5 421 5 512 50 584 50 830
liquid-il 5 66 5 68 50 116 50 124
liquid-render 5 169 5 175 50 437 50 461
lobsters 5 20 5 21 50 10 50 10
mail 5 194 5 209 50 253 50 295
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 157 50 247 50 241
ruby-lsp 5 158 5 163 50 240 50 221
sequel 5 428 5 464 50 597 50 662
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 29 50 12 50 16
addressable-getters 5 165 5 172 50 184 50 207
addressable-join 5 75 5 85 50 66 50 80
addressable-merge 5 161 5 158 50 222 50 231
addressable-new 5 351 5 349 50 521 50 523
addressable-normalize 5 53 5 58 50 60 50 68
addressable-parse 5 104 5 106 50 104 50 114
addressable-setters 5 184 5 186 50 231 50 249
addressable-to-s 5 165 5 171 50 181 50 206
binarytrees 5 82 5 88 50 136 50 168
blurhash 5 83 5 82 50 145 50 144
erubi 5 141 5 154 50 137 50 161
etanni 5 100 5 81 50 73 50 49
fannkuchredux 5 55 5 57 50 100 50 113
fluentd 5 56 5 60 50 20 50 30
gcbench 5 10 5 10 50 10 50 10
graphql 5 363 5 455 50 573 50 892
graphql-native 5 57 5 88 50 22 50 59
knucleotide 5 163 5 149 50 117 50 103
lee 5 23 5 31 50 10 50 22
matmul 5 53 5 51 50 88 50 99
nbody 5 250 5 250 50 660 50 683
nqueens 5 119 5 126 50 555 50 596
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 179 50 698 50 695
protoboeuf-encode 5 200 5 202 50 802 50 796
rack 5 446 5 472 50 708 50 784
ruby-json 5 84 5 113 50 50 50 93
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 210 5 200 50 250 50 239
string_malloc_pressure 5 146 5 33 50 102 50 10
sudoku 5 48 5 49 50 155 50 174
tinygql 5 41 5 43 50 40 50 51
30k_ifelse 5 28 5 28 50 185 50 185
30k_methods 5 38 5 39 50 454 50 449
attr_accessor 5 157 5 164 50 1833 50 1853
cfunc_itself 5 348 5 322 50 1255 50 1258
fib 5 125 5 135 50 939 50 939
getivar 5 216 5 303 50 2306 50 2416
getivar-module 5 103 5 142 50 88 50 123
keyword_args 5 102 5 95 50 1240 50 1243
loops-times 5 23 5 25 50 63 50 62
object-new 5 268 5 481 50 296 50 1482
object-new-initialize 5 168 5 255 50 259 50 517
object-new-no-escape 5 80 5 138 50 89 50 364
respond_to 5 139 5 120 50 3899 50 3899
ruby-xor 5 247 5 230 50 1306 50 1299
send_bmethod 5 118 5 112 50 5539 50 4526
send_cfunc_block 5 107 5 105 50 307 50 315
send_rubyfunc_block 5 195 5 205 50 1371 50 1371
send_rubyfunc_inline 5 30 5 36 50 297 50 297
setivar 5 359 5 349 50 4930 50 4925
setivar_object 5 341 5 273 50 763 50 728
setivar_young 5 342 5 272 50 810 50 736
str_concat 5 391 5 429 50 1202 50 1069
structaref 5 153 5 166 50 1799 50 1834
structaset 5 198 5 215 50 367 50 487
throw 5 1110 5 1313 50 1445 50 1676

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) 1559349 1292790 204 2676 0 0% 0 0 73.314004
chunky-png (click) 322711 266514 79 1372 1 0% 0 0 38.026953
erubi-rails (click) 1381743 1199049 268 3630 23 0% 0 0 93.343229
hexapdf (click) 1521264 1260984 593 15681 45 0% 0 0 420.443094
liquid-c (click) 559066 451087 114 2226 5 0% 0 0 58.224066
liquid-compile (click) 476506 437470 146 2679 2 0% 0 0 72.283973
liquid-il (click) 612935 516969 70 2719 0 0% 0 0 79.072906
liquid-render (click) 664380 589685 131 2945 8 0% 0 0 77.23444
lobsters (click) 8524935 7253991 3127 63013 125 0% 0 0 1995.084451
mail (click) 864201 836118 345 7654 40 0% 0 0 204.425445
psych-load (click) 283111 270454 60 820 2 0% 0 0 22.486841
railsbench (click) 3357313 3035788 1591 19739 105 0% 0 0 535.934151
rubocop (click) 5763634 5040944 3000 57026 132 0% 6 0 1617.58881
ruby-lsp (click) 1046115 950603 408 7425 47 0% 1 0 196.050254
sequel (click) 521196 471443 11 119 0 0% 0 0 4.166924
shipit (click) 6945005 5963641 3131 50052 147 0% 0 0 1589.878068
addressable-equality (click) 321053 281393 44 1381 1 0% 0 0 32.476196
addressable-getters (click) 265487 213728 26 863 0 0% 0 0 20.051796
addressable-join (click) 286043 240402 24 941 0 0% 0 0 22.817087
addressable-merge (click) 271000 208511 27 896 0 0% 0 0 21.056714
addressable-new (click) 260905 224084 21 563 0 0% 0 0 13.27973
addressable-normalize (click) 319223 304692 43 1327 1 0% 0 0 31.820229
addressable-parse (click) 285016 260565 26 880 0 0% 0 0 20.744665
addressable-setters (click) 261880 227026 20 582 0 0% 0 0 13.640834
addressable-to-s (click) 283822 210669 26 849 0 0% 0 0 20.163296
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.792811
blurhash (click) 52495 43786 27 607 0 0% 0 0 17.793703
erubi (click) 246330 229000 6 134 0 0% 0 0 3.888108
etanni (click) 33079 34728 8 114 0 0% 0 0 3.427396
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.809884
fluentd (click) 511081 465081 7 116 0 0% 0 0 3.573652
gcbench (click) 15893 8734 9 110 0 0% 0 0 3.473321
graphql (click) 396843 343645 74 1939 17 0% 0 0 52.580824
graphql-native (click) 354995 327538 39 532 0 0% 0 0 13.648664
knucleotide (click) 9961 2328 7 110 0 0% 0 0 4.720431
lee (click) 315583 260186 50 1101 0 0% 0 0 30.191562
matmul (click) 11103 4709 8 136 0 0% 0 0 4.121325
nbody (click) 14448 21176 6 251 0 0% 0 0 6.077166
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.244893
optcarrot (click) 321897 302848 188 4600 34 0% 0 0 106.565766
protoboeuf (click) 175400 243898 12 2904 0 0% 0 0 73.905218
protoboeuf-encode (click) 247853 316926 14 1820 0 0% 0 0 42.260636
rack (click) 275756 242129 35 581 0 0% 0 0 14.491799
ruby-json (click) 19849 17818 8 210 0 0% 0 0 5.78469
rubyboy (click) 707795 641666 154 6875 42 0% 0 0 163.229924
rubykon (click) 146721 137257 137 2078 3 0% 0 0 54.154064
splay (click) 34682 14303 9 175 0 0% 0 0 5.15975
string_malloc_pressure (click) 4071 3932 6 49 0 0% 0 0 1.716897
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.808301
tinygql (click) 302142 266929 59 1024 5 0% 0 0 26.18816
30k_ifelse (click) 6265365 5037717 9260 76309 0 0% 0 0 1864.776532
30k_methods (click) 2278130 1643075 5780 19370 0 0% 0 0 473.30831
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.085839
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.515955
fib (click) 2659 2995 3 30 0 0% 0 0 1.108851
getivar (click) 3789 6778 3 79 0 0% 0 0 1.920995
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.306798
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.805859
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.901584
object-new (click) 2406 2818 2 36 0 0% 0 0 0.98219
object-new-initialize (click) 3156 3352 4 43 0 0% 0 0 1.301219
object-new-no-escape (click) 4285 4620 5 63 0 0% 0 0 1.696249
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.102883
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.793251
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.791143
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.280941
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.76118
send_rubyfunc_inline (click) 5654 403 2 35 0 0% 0 0 1.047596
setivar (click) 2783 3726 3 46 0 0% 0 0 1.247351
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.406844
setivar_young (click) 4441 4926 4 63 0 0% 0 0 1.685086
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.452083
structaref (click) 4407 9095 3 88 0 0% 0 0 2.305171
structaset (click) 4113 5834 3 70 0 0% 0 0 1.78283
throw (click) 5953 4624 5 53 0 0% 0 0 1.788027

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.