Ruby Benchmarks

Details for Benchmarks at 2025-12-22 00:44:37 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 4.0.0dev is
  • 94.7% faster than CRuby 4.0.0dev
  • 4.7% faster than YJIT 3.4.7
On railsbench it is
  • 111.8% faster than CRuby 4.0.0dev
  • 10.0% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 16 minutes
aarch64 runtime: 7 hours, 9 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.0.0dev warmups CRuby 4.0.0dev iters YJIT 3.4.7 warmups YJIT 3.4.7 iters YJIT 4.0.0dev warmups YJIT 4.0.0dev iters
activerecord 5 91 5 99 50 191 50 238
chunky-png 5 31 5 33 50 33 50 30
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 422 5 426 50 630 50 629
liquid-compile 5 439 5 472 50 586 50 686
liquid-render 5 172 5 171 50 433 50 424
lobsters 5 20 5 20 50 10 50 10
mail 5 195 5 190 50 253 50 273
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 153 5 158 50 246 50 251
ruby-lsp 5 138 5 146 50 223 50 243
sequel 5 421 5 431 50 606 50 609
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 26 50 11 50 10
addressable-getters 5 164 5 166 50 182 50 189
addressable-join 5 72 5 74 50 64 50 68
addressable-merge 5 160 5 153 50 222 50 217
addressable-new 5 352 5 344 50 524 50 518
addressable-normalize 5 53 5 53 50 59 50 56
addressable-parse 5 103 5 102 50 104 50 106
addressable-setters 5 184 5 179 50 230 50 227
addressable-to-s 5 163 5 165 50 183 50 190
binarytrees 5 82 5 85 50 136 50 137
blurhash 5 83 5 87 50 143 50 145
erubi 5 138 5 141 50 134 50 142
etanni 5 99 5 68 50 71 50 33
fannkuchredux 5 55 5 57 50 102 50 104
fluentd 5 56 5 61 50 20 50 30
graphql 5 371 5 471 50 573 50 916
graphql-native 5 59 5 86 50 22 50 67
knucleotide 5 163 5 158 50 117 50 111
lee 5 23 5 23 50 10 50 10
matmul 5 51 5 50 50 95 50 95
nbody 5 247 5 256 50 676 50 706
nqueens 5 116 5 122 50 556 50 588
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 183 50 706 50 703
protoboeuf-encode 5 198 5 198 50 833 50 775
rack 5 435 5 448 50 715 50 697
ruby-json 5 82 5 96 50 46 50 67
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 49 50 156 50 163
tinygql 5 41 5 44 50 35 50 46
30k_ifelse 5 28 5 28 50 184 50 181
30k_methods 5 38 5 40 50 448 50 455
attr_accessor 5 157 5 197 50 1834 50 1929
cfunc_itself 5 348 5 354 50 1255 50 1258
fib 5 124 5 140 50 940 50 939
getivar 5 217 5 326 50 2316 50 2434
getivar-module 5 104 5 138 50 90 50 268
keyword_args 5 100 5 105 50 1240 50 1243
loops-times 5 23 5 26 50 64 50 59
object-new 5 268 5 362 50 297 50 674
respond_to 5 139 5 138 50 3891 50 3905
ruby-xor 5 236 5 246 50 1314 50 1290
send_bmethod 5 117 5 121 50 5538 50 4527
send_cfunc_block 5 106 5 106 50 353 50 343
send_rubyfunc_block 5 250 5 248 50 6920 50 6925
setivar 5 360 5 468 50 4924 50 5037
setivar_object 5 341 5 334 50 753 50 617
setivar_young 5 341 5 337 50 799 50 639
str_concat 5 391 5 428 50 1198 50 1124
structaref 5 156 5 192 50 1815 50 1885
structaset 5 203 5 261 50 396 50 516
throw 5 1089 5 1284 50 1421 50 1551

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) 1545416 1322910 203 2653 0 0% 0 0 75.705664
chunky-png (click) 320216 286575 79 1373 1 0% 0 0 38.694615
erubi-rails (click) 1362613 1179760 268 3624 22 0% 0 0 96.195814
hexapdf (click) 1518118 1300492 593 15658 43 0% 0 0 442.369188
liquid-c (click) 556890 480024 114 2224 5 0% 0 0 59.436109
liquid-compile (click) 475402 402468 146 2703 2 0% 0 0 78.40929
liquid-render (click) 662981 585694 131 2946 8 0% 0 0 79.018574
lobsters (click) 8658069 7214126 3127 63916 117 0% 0 0 2197.082026
mail (click) 868600 805661 345 7721 40 0% 0 0 215.333841
psych-load (click) 288196 233002 61 828 2 0% 0 0 23.84229
railsbench (click) 3347316 3007156 1591 19762 97 0% 0 0 554.083504
rubocop (click) 5761178 5022933 3002 56869 127 0% 6 0 1662.823995
ruby-lsp (click) 959517 912607 343 6729 45 0% 1 0 181.258896
sequel (click) 493123 426203 11 119 0 0% 0 0 3.950688
shipit (click) 7655201 6451286 3365 53525 182 0% 1 0 1788.061269
addressable-equality (click) 318843 237848 44 1381 1 0% 0 0 34.173814
addressable-getters (click) 278406 236611 26 863 0 0% 0 0 20.976408
addressable-join (click) 283780 261448 24 941 0 0% 0 0 23.354942
addressable-merge (click) 283088 247011 27 896 0 0% 0 0 22.422313
addressable-new (click) 259553 205757 21 565 0 0% 0 0 14.311673
addressable-normalize (click) 314251 241077 43 1328 1 0% 0 0 32.792052
addressable-parse (click) 281118 254825 26 880 0 0% 0 0 21.579032
addressable-setters (click) 259582 191438 20 582 0 0% 0 0 14.599243
addressable-to-s (click) 284991 243583 26 971 0 0% 0 0 23.331123
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.873395
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.909433
erubi (click) 248114 206969 6 134 0 0% 0 0 3.947886
etanni (click) 32832 35642 8 113 0 0% 0 0 3.501692
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.853489
fluentd (click) 484136 400377 7 115 0 0% 0 0 3.737496
graphql (click) 409573 360042 73 1921 19 0% 0 0 53.76785
graphql-native (click) 353332 268665 39 532 0 0% 0 0 14.17102
knucleotide (click) 9997 11103 7 113 0 0% 0 0 6.657385
lee (click) 316708 278353 49 1097 0 0% 0 0 31.821538
matmul (click) 11103 4709 8 136 0 0% 0 0 4.247549
nbody (click) 14448 21176 6 251 0 0% 0 0 6.114295
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.25384
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 111.170929
protoboeuf (click) 169555 177006 12 2829 0 0% 0 0 71.83502
protoboeuf-encode (click) 242967 283659 14 1815 0 0% 0 0 44.206382
rack (click) 286306 231774 35 670 0 0% 0 0 17.321896
ruby-json (click) 20323 18532 8 206 0 0% 0 0 5.640178
rubyboy (click) 703015 694234 154 6866 42 0% 0 0 166.80801
rubykon (click) 146869 163015 137 2080 3 0% 0 0 56.600305
sudoku (click) 51704 65882 7 870 0 0% 0 0 23.125162
tinygql (click) 301186 247421 59 1031 5 0% 0 0 26.973786
30k_ifelse (click) 6222887 5052688 9260 75477 0 0% 0 0 1925.341891
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 490.851935
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.120387
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.544953
fib (click) 2659 2995 3 30 0 0% 0 0 1.126473
getivar (click) 3789 6778 3 79 0 0% 0 0 1.980224
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.302268
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.819622
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.919486
object-new (click) 2406 2818 2 36 0 0% 0 0 1.111386
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.133186
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.836863
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.845625
send_cfunc_block (click) 14429 12201 5 192 0 0% 0 0 4.155034
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.510942
setivar (click) 2783 3726 3 46 0 0% 0 0 1.28335
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.414294
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.746069
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.451602
structaref (click) 4407 9095 3 88 0 0% 0 0 2.372062
structaset (click) 3926 5614 3 70 0 0% 0 0 1.77894
throw (click) 5953 4624 5 53 0 0% 0 0 1.794572

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.