Ruby Benchmarks

Details for Benchmarks at 2025-12-28 00:47:54 UTC

YJIT metrics from the ruby-bench suite using Ruby 8415f8facc.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 96.9% faster than CRuby 4.1.0dev
  • 4.1% faster than YJIT 3.4.7
On railsbench it is
  • 114.1% faster than CRuby 4.1.0dev
  • 9.5% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 12 minutes
aarch64 runtime: 7 hours, 6 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 99 50 190 50 228
chunky-png 5 31 5 32 50 33 50 30
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 424 5 425 50 628 50 632
liquid-compile 5 419 5 471 50 583 50 714
liquid-render 5 171 5 172 50 435 50 422
mail 5 195 5 189 50 253 50 252
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 155 5 157 50 247 50 248
ruby-lsp 5 145 5 147 50 247 50 245
sequel 5 428 5 426 50 601 50 598
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 26 50 12 50 10
addressable-getters 5 164 5 168 50 183 50 196
addressable-join 5 73 5 75 50 65 50 70
addressable-merge 5 159 5 156 50 222 50 219
addressable-new 5 353 5 351 50 526 50 523
addressable-normalize 5 53 5 53 50 59 50 57
addressable-parse 5 103 5 104 50 104 50 107
addressable-setters 5 184 5 180 50 230 50 231
addressable-to-s 5 163 5 168 50 183 50 195
binarytrees 5 82 5 83 50 136 50 137
blurhash 5 83 5 87 50 143 50 144
erubi 5 138 5 141 50 140 50 139
etanni 5 97 5 67 50 71 50 33
fannkuchredux 5 55 5 55 50 101 50 98
fluentd 5 56 5 60 50 27 50 26
graphql 5 374 5 468 50 570 50 932
graphql-native 5 59 5 85 50 21 50 64
knucleotide 5 162 5 155 50 118 50 108
lee 5 23 5 24 50 10 50 10
matmul 5 51 5 50 50 95 50 95
nbody 5 246 5 255 50 676 50 703
nqueens 5 116 5 126 50 557 50 588
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 178 50 707 50 720
protoboeuf-encode 5 198 5 196 50 830 50 777
rack 5 437 5 446 50 707 50 696
ruby-json 5 82 5 96 50 50 50 69
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
sudoku 5 48 5 50 50 157 50 162
tinygql 5 40 5 43 50 40 50 47
30k_ifelse 5 28 5 28 50 184 50 181
30k_methods 5 38 5 41 50 457 50 450
attr_accessor 5 157 5 198 50 1836 50 1919
cfunc_itself 5 347 5 346 50 1255 50 1259
fib 5 124 5 140 50 940 50 940
getivar 5 215 5 277 50 2316 50 2431
getivar-module 5 104 5 141 50 90 50 270
keyword_args 5 99 5 110 50 1240 50 1243
loops-times 5 23 5 26 50 64 50 61
object-new 5 268 5 366 50 298 50 683
respond_to 5 139 5 139 50 3891 50 3903
ruby-xor 5 237 5 254 50 1314 50 1289
send_bmethod 5 116 5 120 50 5538 50 4526
send_cfunc_block 5 106 5 106 50 353 50 343
send_rubyfunc_block 5 249 5 252 50 6923 50 6923
setivar 5 360 5 474 50 4925 50 5039
setivar_object 5 341 5 298 50 714 50 540
setivar_young 5 341 5 302 50 796 50 547
str_concat 5 390 5 430 50 1198 50 1131
structaref 5 156 5 202 50 1811 50 1895
structaset 5 201 5 256 50 395 50 515
throw 5 1090 5 1253 50 1419 50 1579

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) 1544006 1363067 203 2649 0 0% 0 0 74.791564
chunky-png (click) 320682 295895 79 1373 1 0% 0 0 39.077476
erubi-rails (click) 1364682 1224350 268 3654 22 0% 0 0 97.744999
hexapdf (click) 1523753 1355373 593 15687 44 0% 0 0 439.630546
liquid-c (click) 557158 480328 114 2228 5 0% 0 0 59.773755
liquid-compile (click) 479064 398699 146 2708 2 0% 0 0 78.865297
liquid-render (click) 663855 489939 131 2946 8 0% 0 0 79.36565
mail (click) 861856 838799 345 7721 40 0% 0 0 213.261896
psych-load (click) 287669 249031 61 828 2 0% 0 0 23.534163
railsbench (click) 3348882 2910022 1591 19767 98 0% 0 0 554.535951
rubocop (click) 5756902 4994279 3002 56844 126 0% 6 0 1650.934179
ruby-lsp (click) 959737 807194 343 6729 45 0% 1 0 182.80999
sequel (click) 502018 419314 11 119 0 0% 0 0 3.765743
shipit (click) 7442108 6402008 3436 55446 174 0% 1 0 1833.480417
addressable-equality (click) 316489 284785 44 1381 1 0% 0 0 34.331966
addressable-getters (click) 276797 202919 26 863 0 0% 0 0 21.24731
addressable-join (click) 282171 236028 24 941 0 0% 0 0 23.460856
addressable-merge (click) 269280 215650 27 896 0 0% 0 0 22.390974
addressable-new (click) 257194 195305 21 565 0 0% 0 0 14.114914
addressable-normalize (click) 312061 280033 43 1330 1 0% 0 0 32.69345
addressable-parse (click) 279509 245760 26 880 0 0% 0 0 21.631799
addressable-setters (click) 257476 213906 20 582 0 0% 0 0 14.745027
addressable-to-s (click) 276405 242873 26 849 0 0% 0 0 20.747088
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.766892
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.078353
erubi (click) 249272 208214 6 134 0 0% 0 0 4.065512
etanni (click) 32832 35642 8 113 0 0% 0 0 3.449968
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.033423
fluentd (click) 483006 424091 7 115 0 0% 0 0 3.717214
graphql (click) 410039 361243 73 1921 19 0% 0 0 53.650578
graphql-native (click) 354612 295167 39 532 0 0% 0 0 14.021712
knucleotide (click) 9997 11103 7 113 0 0% 0 0 6.733466
lee (click) 317211 304093 49 1094 0 0% 0 0 31.201906
matmul (click) 11103 4709 8 136 0 0% 0 0 4.210399
nbody (click) 14448 21176 6 251 0 0% 0 0 6.091525
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.332272
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 113.373515
protoboeuf (click) 169555 177006 12 2829 0 0% 0 0 72.225658
protoboeuf-encode (click) 242967 283659 14 1815 0 0% 0 0 44.459492
rack (click) 280169 256228 35 585 0 0% 0 0 15.344747
ruby-json (click) 19868 17928 8 206 0 0% 0 0 5.671109
rubyboy (click) 703921 613902 154 6864 42 0% 0 0 167.39567
rubykon (click) 147221 147074 137 2084 3 0% 0 0 56.12042
sudoku (click) 51704 65882 7 870 0 0% 0 0 23.039044
tinygql (click) 300378 246680 59 1025 5 0% 0 0 26.74716
30k_ifelse (click) 6222887 5052688 9260 75477 0 0% 0 0 1932.666006
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 489.874294
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.044638
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.502025
fib (click) 2659 2995 3 30 0 0% 0 0 1.106124
getivar (click) 3789 6778 3 79 0 0% 0 0 1.924013
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.316116
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.819202
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.894419
object-new (click) 2406 2818 2 36 0 0% 0 0 1.093657
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.115706
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.780084
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.801104
send_cfunc_block (click) 14429 12201 5 192 0 0% 0 0 4.116364
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.454769
setivar (click) 2783 3726 3 46 0 0% 0 0 1.22785
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.404428
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.705766
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.472484
structaref (click) 4407 9095 3 88 0 0% 0 0 2.342618
structaset (click) 3926 5614 3 70 0 0% 0 0 1.695808
throw (click) 5953 4624 5 53 0 0% 0 0 1.766636

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.