Ruby Benchmarks

Details for Benchmarks at 2026-08-03 00:58:23 UTC

YJIT metrics from the ruby-bench suite using Ruby 74c2a61ac1.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 96.7% faster than CRuby 4.1.0dev
  • 7.0% faster than YJIT 3.4.7
On railsbench it is
  • 115.9% faster than CRuby 4.1.0dev
  • 16.3% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 9 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 91 5 97 50 201 50 209
chunky-png 5 32 5 31 50 33 50 27
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 423 5 437 50 616 50 666
liquid-compile 5 406 5 515 50 581 50 828
liquid-il 5 67 5 68 50 116 50 123
liquid-render 5 167 5 173 50 430 50 460
lobsters 5 20 5 21 50 10 50 10
mail 5 193 5 209 50 253 50 296
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 242
ruby-lsp 5 158 5 161 50 229 50 221
sequel 5 426 5 460 50 583 50 658
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 30 50 12 50 16
addressable-getters 5 165 5 169 50 183 50 206
addressable-join 5 74 5 84 50 63 50 80
addressable-merge 5 161 5 158 50 222 50 228
addressable-new 5 349 5 343 50 518 50 516
addressable-normalize 5 52 5 59 50 60 50 68
addressable-parse 5 103 5 105 50 103 50 115
addressable-setters 5 183 5 182 50 233 50 247
addressable-to-s 5 164 5 170 50 182 50 205
binarytrees 5 82 5 88 50 136 50 168
blurhash 5 84 5 82 50 145 50 145
erubi 5 142 5 154 50 132 50 161
etanni 5 100 5 81 50 72 50 49
fannkuchredux 5 55 5 56 50 101 50 111
fluentd 5 70 5 60 50 20 50 24
gcbench 5 10 5 10 50 10 50 10
graphql 5 369 5 463 50 568 50 909
graphql-native 5 57 5 86 50 23 50 58
knucleotide 5 163 5 151 50 117 50 105
lee 5 23 5 31 50 10 50 21
matmul 5 53 5 51 50 87 50 100
nbody 5 250 5 255 50 663 50 685
nqueens 5 119 5 126 50 555 50 597
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 179 50 695 50 698
protoboeuf-encode 5 201 5 203 50 794 50 793
rack 5 442 5 463 50 712 50 783
ruby-json 5 84 5 113 50 51 50 92
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 209 5 201 50 250 50 238
string_malloc_pressure 5 146 5 34 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 184
30k_methods 5 38 5 39 50 454 50 457
attr_accessor 5 149 5 161 50 1833 50 1850
cfunc_itself 5 347 5 328 50 1255 50 1258
fib 5 125 5 135 50 939 50 939
getivar 5 210 5 298 50 2315 50 2412
getivar-module 5 103 5 137 50 89 50 123
keyword_args 5 102 5 96 50 1240 50 1243
loops-times 5 23 5 25 50 60 50 62
object-new 5 268 5 475 50 297 50 1479
object-new-initialize 5 169 5 254 50 259 50 516
object-new-no-escape 5 80 5 138 50 89 50 362
respond_to 5 139 5 119 50 3903 50 3900
ruby-xor 5 247 5 229 50 1306 50 1301
send_bmethod 5 118 5 112 50 5539 50 4526
send_cfunc_block 5 106 5 92 50 305 50 315
send_rubyfunc_block 5 196 5 200 50 1372 50 1375
send_rubyfunc_inline 5 30 5 36 50 297 50 298
setivar 5 359 5 349 50 4929 50 4925
setivar_object 5 341 5 271 50 764 50 726
setivar_young 5 342 5 271 50 809 50 734
str_concat 5 391 5 431 50 1195 50 1071
structaref 5 153 5 161 50 1800 50 1823
structaset 5 198 5 206 50 368 50 483
throw 5 1110 5 1307 50 1442 50 1666

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) 1564449 1356300 204 2679 0 0% 0 0 79.009044
chunky-png (click) 322711 266514 79 1372 1 0% 0 0 38.458036
erubi-rails (click) 1381743 1174461 268 3630 23 0% 0 0 93.402821
hexapdf (click) 1525050 1339151 593 15682 45 0% 0 0 422.777523
liquid-c (click) 559066 451087 114 2226 5 0% 0 0 59.202558
liquid-compile (click) 478319 431392 146 2679 2 0% 0 0 72.649565
liquid-il (click) 614743 584697 70 2717 0 0% 0 0 78.932331
liquid-render (click) 668037 561351 131 2945 8 0% 0 0 76.847262
lobsters (click) 8529124 7227750 3126 63068 125 0% 0 0 2009.874145
mail (click) 866111 813714 345 7654 40 0% 0 0 206.092651
psych-load (click) 286772 283145 60 820 2 0% 0 0 22.828547
railsbench (click) 3359268 2891697 1591 19739 105 0% 0 0 535.138083
rubocop (click) 5765161 5018103 3000 57026 132 0% 6 0 1723.671586
ruby-lsp (click) 1046115 925987 408 7425 47 0% 1 0 195.944686
sequel (click) 523106 473583 11 119 0 0% 0 0 4.200125
shipit (click) 6880588 5951088 3137 50133 147 0% 0 0 1595.127457
addressable-equality (click) 323931 293393 44 1381 1 0% 0 0 33.496334
addressable-getters (click) 284214 228099 26 863 0 0% 0 0 20.39491
addressable-join (click) 289706 244876 24 941 0 0% 0 0 22.520656
addressable-merge (click) 287822 253483 27 896 0 0% 0 0 21.374045
addressable-new (click) 264568 220366 21 563 0 0% 0 0 13.697097
addressable-normalize (click) 319289 263790 43 1327 1 0% 0 0 31.786274
addressable-parse (click) 286931 254550 26 880 0 0% 0 0 21.073784
addressable-setters (click) 264763 222647 20 582 0 0% 0 0 13.941824
addressable-to-s (click) 264797 228745 26 849 0 0% 0 0 19.993316
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.789248
blurhash (click) 52495 43786 27 607 0 0% 0 0 17.797751
erubi (click) 231266 194527 6 134 0 0% 0 0 3.92
etanni (click) 33079 34728 8 114 0 0% 0 0 3.436046
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.743649
fluentd (click) 504704 441232 7 116 0 0% 0 0 3.64862
gcbench (click) 15893 8734 9 110 0 0% 0 0 3.46828
graphql (click) 415565 374438 74 1939 18 0% 0 0 52.373284
graphql-native (click) 358648 340224 39 532 0 0% 0 0 13.431145
knucleotide (click) 9961 2328 7 110 0 0% 0 0 4.684003
lee (click) 319241 289261 50 1101 0 0% 0 0 30.539606
matmul (click) 11103 4709 8 136 0 0% 0 0 4.122542
nbody (click) 14448 21176 6 251 0 0% 0 0 6.079899
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.204861
optcarrot (click) 321897 302848 188 4600 34 0% 0 0 106.053931
protoboeuf (click) 175400 243898 12 2904 0 0% 0 0 73.998543
protoboeuf-encode (click) 247853 316926 14 1820 0 0% 0 0 42.288855
rack (click) 285444 230327 35 581 0 0% 0 0 14.538813
ruby-json (click) 19849 17818 8 210 0 0% 0 0 5.773243
rubyboy (click) 709705 594666 154 6875 42 0% 0 0 163.44491
rubykon (click) 146721 137257 137 2078 3 0% 0 0 54.32638
splay (click) 34682 14303 9 175 0 0% 0 0 5.281411
string_malloc_pressure (click) 4071 3932 6 49 0 0% 0 0 1.780224
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.803191
tinygql (click) 286656 247342 59 1024 5 0% 0 0 26.596849
30k_ifelse (click) 6265365 5037717 9260 76309 0 0% 0 0 1879.891939
30k_methods (click) 2278130 1643075 5780 19370 0 0% 0 0 477.94225
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.07838
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.476586
fib (click) 2659 2995 3 30 0 0% 0 0 1.10095
getivar (click) 3789 6778 3 79 0 0% 0 0 1.910965
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.312698
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.77979
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.917588
object-new (click) 2406 2818 2 36 0 0% 0 0 1.003978
object-new-initialize (click) 3156 3352 4 43 0 0% 0 0 1.274013
object-new-no-escape (click) 4285 4620 5 63 0 0% 0 0 1.739853
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.132252
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.763119
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.824124
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.303633
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.755649
send_rubyfunc_inline (click) 5654 403 2 35 0 0% 0 0 1.053946
setivar (click) 2783 3726 3 46 0 0% 0 0 1.229201
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.39282
setivar_young (click) 4441 4926 4 63 0 0% 0 0 1.73529
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.47225
structaref (click) 4407 9095 3 88 0 0% 0 0 2.348479
structaset (click) 4113 5834 3 70 0 0% 0 0 1.7534
throw (click) 5953 4624 5 53 0 0% 0 0 1.778994

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.