Ruby Benchmarks

Details for Benchmarks at 2026-08-04 00:55:47 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 96.5% faster than CRuby 4.1.0dev
  • 6.2% faster than YJIT 3.4.7
On railsbench it is
  • 114.5% faster than CRuby 4.1.0dev
  • 13.0% 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 92 5 95 50 199 50 215
chunky-png 5 32 5 31 50 33 50 28
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 424 5 440 50 618 50 668
liquid-compile 5 406 5 516 50 664 50 827
liquid-il 5 66 5 68 50 116 50 123
liquid-render 5 173 5 173 50 434 50 458
lobsters 5 20 5 21 50 10 50 10
mail 5 193 5 208 50 254 50 294
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 153 5 155 50 248 50 240
ruby-lsp 5 157 5 161 50 222 50 225
sequel 5 421 5 466 50 578 50 663
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 29 50 12 50 17
addressable-getters 5 164 5 170 50 184 50 207
addressable-join 5 74 5 85 50 66 50 80
addressable-merge 5 161 5 158 50 222 50 232
addressable-new 5 350 5 340 50 511 50 517
addressable-normalize 5 52 5 57 50 60 50 69
addressable-parse 5 103 5 106 50 103 50 116
addressable-setters 5 184 5 184 50 233 50 250
addressable-to-s 5 164 5 169 50 183 50 206
binarytrees 5 82 5 88 50 136 50 168
blurhash 5 84 5 83 50 144 50 145
erubi 5 141 5 152 50 127 50 158
etanni 5 100 5 80 50 73 50 47
fannkuchredux 5 55 5 56 50 100 50 109
fluentd 5 63 5 64 50 28 50 28
gcbench 5 10 5 10 50 10 50 10
graphql 5 373 5 467 50 566 50 900
graphql-native 5 58 5 88 50 22 50 58
knucleotide 5 163 5 148 50 117 50 101
lee 5 23 5 31 50 10 50 20
matmul 5 53 5 51 50 88 50 100
nbody 5 249 5 238 50 662 50 683
nqueens 5 119 5 126 50 554 50 595
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 184 50 694 50 682
protoboeuf-encode 5 200 5 201 50 797 50 821
rack 5 440 5 470 50 709 50 764
ruby-json 5 84 5 113 50 50 50 91
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 209 5 205 50 250 50 231
string_malloc_pressure 5 148 5 33 50 101 50 10
sudoku 5 48 5 49 50 155 50 172
tinygql 5 41 5 43 50 37 50 50
30k_ifelse 5 28 5 28 50 186 50 185
30k_methods 5 38 5 39 50 455 50 459
attr_accessor 5 157 5 177 50 1835 50 1885
cfunc_itself 5 347 5 319 50 1252 50 1255
fib 5 103 5 136 50 939 50 938
getivar 5 210 5 330 50 2311 50 2433
getivar-module 5 103 5 144 50 89 50 124
keyword_args 5 102 5 107 50 1240 50 1243
loops-times 5 23 5 26 50 63 50 62
object-new 5 268 5 478 50 295 50 1470
object-new-initialize 5 169 5 252 50 260 50 516
object-new-no-escape 5 81 5 138 50 89 50 363
respond_to 5 139 5 123 50 3907 50 3883
ruby-xor 5 247 5 241 50 1305 50 1295
send_bmethod 5 118 5 114 50 5529 50 4514
send_cfunc_block 5 107 5 108 50 304 50 288
send_rubyfunc_block 5 196 5 209 50 1372 50 1374
send_rubyfunc_inline 5 30 5 36 50 297 50 298
setivar 5 359 5 348 50 4929 50 4904
setivar_object 5 341 5 271 50 764 50 723
setivar_young 5 341 5 270 50 809 50 726
str_concat 5 391 5 432 50 1195 50 1069
structaref 5 153 5 182 50 1800 50 1864
structaset 5 198 5 222 50 368 50 487
throw 5 1106 5 1441 50 1443 50 1901

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) 1554959 1332674 203 2596 0 0% 0 0 71.950648
chunky-png (click) 322711 266514 79 1372 1 0% 0 0 38.420503
erubi-rails (click) 1378075 1178012 268 3630 23 0% 0 0 93.501283
hexapdf (click) 1524927 1322767 593 15681 45 0% 0 0 423.989414
liquid-c (click) 559066 451087 114 2226 5 0% 0 0 58.583176
liquid-compile (click) 474620 435081 146 2679 2 0% 0 0 73.152682
liquid-il (click) 614550 576487 70 2716 0 0% 0 0 79.289697
liquid-render (click) 667971 594061 131 2945 8 0% 0 0 77.547527
lobsters (click) 8509571 7175103 3126 62848 125 0% 0 0 2014.22798
mail (click) 866111 813746 345 7654 40 0% 0 0 205.541922
psych-load (click) 286772 283145 60 820 2 0% 0 0 22.796362
railsbench (click) 3359251 2850711 1591 19739 105 0% 0 0 534.188677
rubocop (click) 5765681 5067796 3000 57031 132 0% 6 0 1622.825862
ruby-lsp (click) 1044372 915709 408 7425 47 0% 1 0 196.155738
sequel (click) 523040 440789 11 119 0 0% 0 0 4.009768
shipit (click) 6871710 5913855 3135 49897 147 0% 0 0 1589.776057
addressable-equality (click) 323931 293393 44 1381 1 0% 0 0 33.524718
addressable-getters (click) 284214 236291 26 863 0 0% 0 0 20.326742
addressable-join (click) 289706 228492 24 941 0 0% 0 0 23.096242
addressable-merge (click) 289732 255655 27 896 0 0% 0 0 21.14874
addressable-new (click) 264568 228558 21 563 0 0% 0 0 13.559415
addressable-normalize (click) 300557 265798 43 1327 1 0% 0 0 31.073756
addressable-parse (click) 286926 254545 26 880 0 0% 0 0 21.274855
addressable-setters (click) 264763 222647 20 582 0 0% 0 0 14.216017
addressable-to-s (click) 283822 210669 26 849 0 0% 0 0 20.024144
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.781458
blurhash (click) 52495 43786 27 607 0 0% 0 0 17.902831
erubi (click) 249993 225287 6 134 0 0% 0 0 3.878666
etanni (click) 33079 34728 8 114 0 0% 0 0 3.438978
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.770488
fluentd (click) 512509 434317 7 116 0 0% 0 0 3.644099
gcbench (click) 15893 8734 9 110 0 0% 0 0 3.536686
graphql (click) 415286 390614 74 1939 18 0% 0 0 52.525465
graphql-native (click) 358648 340224 39 532 0 0% 0 0 13.585826
knucleotide (click) 9961 2328 7 110 0 0% 0 0 4.739423
lee (click) 319241 289261 50 1101 0 0% 0 0 30.809747
matmul (click) 11103 4709 8 136 0 0% 0 0 4.192793
nbody (click) 14448 21176 6 251 0 0% 0 0 6.159391
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.220618
optcarrot (click) 321897 302848 188 4600 34 0% 0 0 107.271087
protoboeuf (click) 175400 243898 12 2904 0 0% 0 0 74.176226
protoboeuf-encode (click) 247853 316926 14 1820 0 0% 0 0 42.755203
rack (click) 281164 241659 35 581 0 0% 0 0 14.61013
ruby-json (click) 19522 17429 8 210 0 0% 0 0 5.788105
rubyboy (click) 709426 659974 154 6875 42 0% 0 0 163.193728
rubykon (click) 146721 137257 137 2078 3 0% 0 0 54.437492
splay (click) 34682 14303 9 175 0 0% 0 0 5.235875
string_malloc_pressure (click) 4071 3932 6 49 0 0% 0 0 1.766263
sudoku (click) 51776 65830 7 871 0 0% 0 0 23.093723
tinygql (click) 302142 266929 59 1024 5 0% 0 0 26.149261
30k_ifelse (click) 6265365 5037717 9260 76309 0 0% 0 0 1872.914835
30k_methods (click) 2278130 1643075 5780 19370 0 0% 0 0 475.527148
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.095722
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.504274
fib (click) 2659 2995 3 30 0 0% 0 0 1.10252
getivar (click) 3789 6778 3 79 0 0% 0 0 1.885897
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.384254
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.814871
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.953217
object-new (click) 2406 2818 2 36 0 0% 0 0 0.986024
object-new-initialize (click) 3156 3352 4 43 0 0% 0 0 1.316778
object-new-no-escape (click) 4285 4620 5 63 0 0% 0 0 1.738816
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.127921
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.804565
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.82427
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.290379
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.750326
send_rubyfunc_inline (click) 5654 403 2 35 0 0% 0 0 1.046045
setivar (click) 2783 3726 3 46 0 0% 0 0 1.312429
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.448436
setivar_young (click) 4441 4926 4 63 0 0% 0 0 1.759845
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.550991
structaref (click) 4407 9095 3 88 0 0% 0 0 2.39121
structaset (click) 4113 5834 3 70 0 0% 0 0 1.787021
throw (click) 5953 4624 5 53 0 0% 0 0 1.798175

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.