Ruby Benchmarks

Details for Benchmarks at 2026-08-02 00:58:51 UTC

YJIT metrics from the ruby-bench suite using Ruby 7a18459c69.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 97.0% faster than CRuby 4.1.0dev
  • 7.2% faster than YJIT 3.4.7
On railsbench it is
  • 116.5% faster than CRuby 4.1.0dev
  • 15.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 91 5 98 50 198 50 210
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 423 5 439 50 621 50 667
liquid-compile 5 419 5 513 50 581 50 831
liquid-il 5 67 5 67 50 116 50 125
liquid-render 5 172 5 173 50 434 50 461
lobsters 5 20 5 21 50 10 50 10
mail 5 193 5 209 50 254 50 295
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 155 5 155 50 247 50 241
ruby-lsp 5 158 5 158 50 218 50 221
sequel 5 422 5 462 50 589 50 660
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 30 50 12 50 16
addressable-getters 5 166 5 170 50 184 50 206
addressable-join 5 75 5 84 50 66 50 79
addressable-merge 5 162 5 158 50 221 50 228
addressable-new 5 357 5 344 50 517 50 510
addressable-normalize 5 53 5 58 50 61 50 68
addressable-parse 5 104 5 106 50 104 50 114
addressable-setters 5 186 5 183 50 235 50 246
addressable-to-s 5 165 5 170 50 183 50 205
binarytrees 5 82 5 88 50 136 50 168
blurhash 5 84 5 82 50 145 50 145
erubi 5 139 5 155 50 140 50 161
etanni 5 101 5 81 50 72 50 49
fannkuchredux 5 55 5 56 50 101 50 109
fluentd 5 62 5 59 50 22 50 30
gcbench 5 10 5 10 50 10 50 10
graphql 5 375 5 461 50 563 50 916
graphql-native 5 58 5 87 50 22 50 58
knucleotide 5 163 5 151 50 118 50 104
lee 5 23 5 31 50 10 50 22
matmul 5 53 5 51 50 88 50 99
nbody 5 250 5 255 50 661 50 688
nqueens 5 119 5 126 50 555 50 597
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 176 50 696 50 697
protoboeuf-encode 5 201 5 203 50 791 50 793
rack 5 444 5 470 50 722 50 768
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 209 5 201 50 250 50 241
string_malloc_pressure 5 145 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 186 50 184
30k_methods 5 38 5 39 50 455 50 456
attr_accessor 5 157 5 161 50 1832 50 1849
cfunc_itself 5 348 5 329 50 1255 50 1258
fib 5 125 5 135 50 939 50 939
getivar 5 213 5 298 50 2314 50 2414
getivar-module 5 103 5 137 50 89 50 123
keyword_args 5 102 5 96 50 1240 50 1242
loops-times 5 23 5 25 50 63 50 62
object-new 5 268 5 477 50 296 50 1484
object-new-initialize 5 169 5 255 50 259 50 504
object-new-no-escape 5 80 5 140 50 89 50 364
respond_to 5 139 5 120 50 3902 50 3900
ruby-xor 5 247 5 230 50 1306 50 1301
send_bmethod 5 118 5 113 50 5540 50 4526
send_cfunc_block 5 106 5 106 50 305 50 314
send_rubyfunc_block 5 196 5 200 50 1372 50 1375
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 271 50 766 50 725
setivar_young 5 341 5 271 50 808 50 734
str_concat 5 391 5 431 50 1195 50 1070
structaref 5 153 5 139 50 1799 50 1821
structaset 5 198 5 207 50 369 50 483
throw 5 1109 5 1307 50 1443 50 1662

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) 1559409 1358461 204 2673 0 0% 0 0 77.965088
chunky-png (click) 318760 286280 79 1372 1 0% 0 0 38.249944
erubi-rails (click) 1381743 1174501 268 3630 23 0% 0 0 93.190667
hexapdf (click) 1515808 1409059 593 15681 45 0% 0 0 427.796318
liquid-c (click) 559066 451087 114 2226 5 0% 0 0 58.659572
liquid-compile (click) 478319 439584 146 2679 2 0% 0 0 72.537587
liquid-il (click) 614677 576434 70 2718 0 0% 0 0 79.365269
liquid-render (click) 664385 589685 131 2945 8 0% 0 0 77.609567
lobsters (click) 8521934 7235388 3127 62986 125 0% 0 0 2000.164079
mail (click) 866111 813714 345 7654 40 0% 0 0 205.663405
psych-load (click) 286772 283145 60 820 2 0% 0 0 22.82311
railsbench (click) 3359223 2858399 1591 19739 105 0% 0 0 532.782627
rubocop (click) 5764882 5009821 3000 57026 132 0% 6 0 1712.561519
ruby-lsp (click) 1045203 957322 408 7425 47 0% 1 0 196.286001
sequel (click) 520284 445565 11 119 0 0% 0 0 4.35422
shipit (click) 6881184 5875401 3135 49895 147 0% 0 0 1573.286184
addressable-equality (click) 321058 289585 44 1381 1 0% 0 0 32.972872
addressable-getters (click) 284214 236291 26 863 0 0% 0 0 20.292604
addressable-join (click) 289706 228492 24 941 0 0% 0 0 22.535163
addressable-merge (click) 289732 247463 27 896 0 0% 0 0 21.389682
addressable-new (click) 261746 225136 21 563 0 0% 0 0 13.332335
addressable-normalize (click) 318377 254328 43 1327 1 0% 0 0 31.704933
addressable-parse (click) 286926 246353 26 880 0 0% 0 0 20.881068
addressable-setters (click) 260802 226044 20 582 0 0% 0 0 13.910752
addressable-to-s (click) 280164 230771 26 849 0 0% 0 0 19.618393
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.757508
blurhash (click) 52495 43786 27 607 0 0% 0 0 17.893998
erubi (click) 249993 217095 6 134 0 0% 0 0 3.812847
etanni (click) 33079 34728 8 114 0 0% 0 0 3.43859
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.767065
fluentd (click) 513550 501166 7 116 0 0% 0 0 3.649899
gcbench (click) 15893 8734 9 110 0 0% 0 0 3.502338
graphql (click) 415565 366266 74 1939 18 0% 0 0 52.233562
graphql-native (click) 358648 340224 39 532 0 0% 0 0 13.529797
knucleotide (click) 9961 2328 7 110 0 0% 0 0 4.697151
lee (click) 319241 289261 50 1101 0 0% 0 0 30.656254
matmul (click) 11103 4709 8 136 0 0% 0 0 4.136465
nbody (click) 14448 21176 6 251 0 0% 0 0 6.131494
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.198028
optcarrot (click) 321897 302848 188 4600 34 0% 0 0 106.517094
protoboeuf (click) 175400 243898 12 2904 0 0% 0 0 73.8782
protoboeuf-encode (click) 247853 316926 14 1820 0 0% 0 0 42.28076
rack (click) 281781 242264 35 581 0 0% 0 0 14.464456
ruby-json (click) 19849 17818 8 210 0 0% 0 0 5.682393
rubyboy (click) 706888 615800 154 6875 42 0% 0 0 162.516409
rubykon (click) 146721 137257 137 2078 3 0% 0 0 54.077342
splay (click) 34682 14303 9 175 0 0% 0 0 5.224957
string_malloc_pressure (click) 4071 3932 6 49 0 0% 0 0 1.696455
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.897935
tinygql (click) 302147 299697 59 1024 5 0% 0 0 26.338637
30k_ifelse (click) 6265365 5037717 9260 76309 0 0% 0 0 1868.730272
30k_methods (click) 2278130 1643075 5780 19370 0 0% 0 0 473.869003
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.053677
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.499126
fib (click) 2659 2995 3 30 0 0% 0 0 1.111632
getivar (click) 3789 6778 3 79 0 0% 0 0 1.919247
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.302283
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.790273
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.877232
object-new (click) 2406 2818 2 36 0 0% 0 0 0.984739
object-new-initialize (click) 3156 3352 4 43 0 0% 0 0 1.31094
object-new-no-escape (click) 4285 4620 5 63 0 0% 0 0 1.741184
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.109542
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.762685
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.783469
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.291524
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.715411
send_rubyfunc_inline (click) 5654 403 2 35 0 0% 0 0 1.070091
setivar (click) 2783 3726 3 46 0 0% 0 0 1.259684
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.4012
setivar_young (click) 4441 4926 4 63 0 0% 0 0 1.752043
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.466291
structaref (click) 4407 9095 3 88 0 0% 0 0 2.314567
structaset (click) 4113 5834 3 70 0 0% 0 0 1.775377
throw (click) 5953 4624 5 53 0 0% 0 0 1.792579

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.