Ruby Benchmarks

Details for Benchmarks at 2025-12-29 00:46:40 UTC

YJIT metrics from the ruby-bench suite using Ruby 9e78353c0f.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 97.4% faster than CRuby 4.1.0dev
  • 4.5% faster than YJIT 3.4.7
On railsbench it is
  • 114.3% faster than CRuby 4.1.0dev
  • 9.3% 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 90 5 98 50 190 50 222
chunky-png 5 31 5 32 50 33 50 29
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 421 5 426 50 626 50 615
liquid-compile 5 405 5 469 50 585 50 711
liquid-render 5 170 5 176 50 433 50 412
mail 5 194 5 189 50 253 50 270
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 247 50 247
ruby-lsp 5 145 5 149 50 234 50 249
sequel 5 427 5 431 50 590 50 602
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 27 50 11 50 10
addressable-getters 5 164 5 169 50 183 50 186
addressable-join 5 72 5 76 50 65 50 66
addressable-merge 5 160 5 156 50 222 50 213
addressable-new 5 353 5 344 50 525 50 505
addressable-normalize 5 53 5 52 50 59 50 55
addressable-parse 5 103 5 103 50 104 50 101
addressable-setters 5 184 5 178 50 230 50 220
addressable-to-s 5 163 5 167 50 183 50 186
binarytrees 5 82 5 84 50 136 50 137
blurhash 5 84 5 88 50 143 50 145
erubi 5 137 5 140 50 125 50 128
etanni 5 97 5 66 50 71 50 31
fannkuchredux 5 54 5 54 50 102 50 96
fluentd 5 56 5 59 50 22 50 28
graphql 5 370 5 474 50 569 50 931
graphql-native 5 59 5 85 50 21 50 67
knucleotide 5 162 5 156 50 117 50 111
lee 5 23 5 23 50 10 50 10
matmul 5 51 5 53 50 94 50 96
nbody 5 247 5 277 50 676 50 664
nqueens 5 116 5 123 50 556 50 589
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 175 50 706 50 656
protoboeuf-encode 5 196 5 200 50 829 50 780
rack 5 442 5 449 50 716 50 696
ruby-json 5 82 5 95 50 46 50 66
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 50 50 157 50 162
tinygql 5 41 5 43 50 36 50 41
30k_ifelse 5 28 5 28 50 184 50 181
30k_methods 5 38 5 40 50 457 50 451
attr_accessor 5 157 5 214 50 1791 50 1943
cfunc_itself 5 348 5 350 50 1255 50 1259
fib 5 124 5 140 50 939 50 939
getivar 5 217 5 343 50 2316 50 2442
getivar-module 5 104 5 132 50 90 50 271
keyword_args 5 100 5 104 50 1240 50 1242
loops-times 5 23 5 26 50 63 50 61
object-new 5 268 5 363 50 299 50 673
respond_to 5 139 5 138 50 3885 50 3901
ruby-xor 5 236 5 247 50 1314 50 1289
send_bmethod 5 116 5 123 50 5539 50 4527
send_cfunc_block 5 106 5 106 50 353 50 340
send_rubyfunc_block 5 249 5 244 50 6918 50 6925
setivar 5 360 5 475 50 4927 50 5040
setivar_object 5 341 5 335 50 750 50 508
setivar_young 5 341 5 334 50 799 50 523
str_concat 5 394 5 429 50 1199 50 1125
structaref 5 156 5 211 50 1810 50 1870
structaset 5 201 5 257 50 395 50 514
throw 5 1091 5 1235 50 1413 50 1565

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) 1543721 1338247 203 2645 0 0% 0 0 75.300095
chunky-png (click) 320434 246587 79 1373 1 0% 0 0 38.918497
erubi-rails (click) 1370554 1148012 268 3705 22 0% 0 0 98.253701
hexapdf (click) 1508730 1362975 593 15664 44 0% 0 0 438.018912
liquid-c (click) 557116 480270 114 2228 5 0% 0 0 60.482797
liquid-compile (click) 478927 382125 146 2700 2 0% 0 0 79.847127
liquid-render (click) 662798 554177 131 2946 8 0% 0 0 80.7613
mail (click) 866677 795693 345 7721 40 0% 0 0 215.39645
psych-load (click) 287917 273705 61 828 2 0% 0 0 23.709911
railsbench (click) 3342301 2894376 1591 19725 97 0% 0 0 588.70847
rubocop (click) 5760350 4890642 3002 56868 126 0% 6 0 1655.744346
ruby-lsp (click) 959617 839533 343 6720 44 0% 1 0 182.394921
sequel (click) 501025 437391 11 119 0 0% 0 0 3.984019
shipit (click) 7140739 6146917 3296 52071 170 0% 0 0 1762.484579
addressable-equality (click) 314958 282648 44 1381 0 0% 0 0 33.583431
addressable-getters (click) 277326 236013 26 863 0 0% 0 0 21.176227
addressable-join (click) 282171 211423 24 941 0 0% 0 0 23.569297
addressable-merge (click) 282450 238664 27 896 0 0% 0 0 22.215162
addressable-new (click) 258865 213634 21 595 0 0% 0 0 14.84089
addressable-normalize (click) 312949 272682 43 1342 1 0% 0 0 32.972871
addressable-parse (click) 266885 247721 26 880 0 0% 0 0 21.919722
addressable-setters (click) 257476 213877 20 582 0 0% 0 0 14.56847
addressable-to-s (click) 276653 234759 26 849 0 0% 0 0 20.750977
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.810274
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.686917
erubi (click) 247587 173797 6 134 0 0% 0 0 3.922651
etanni (click) 33287 36246 8 113 0 0% 0 0 3.481861
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.696737
fluentd (click) 482727 407438 7 115 0 0% 0 0 3.863149
graphql (click) 410039 369406 73 1921 19 0% 0 0 53.547467
graphql-native (click) 352778 292836 39 532 0 0% 0 0 14.066598
knucleotide (click) 9997 11103 7 113 0 0% 0 0 6.207885
lee (click) 304647 256946 49 1097 0 0% 0 0 31.629352
matmul (click) 11103 4709 8 136 0 0% 0 0 4.237767
nbody (click) 14448 21176 6 251 0 0% 0 0 6.085099
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.144679
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 110.995126
protoboeuf (click) 169555 177006 12 2829 0 0% 0 0 71.822909
protoboeuf-encode (click) 242967 283659 14 1815 0 0% 0 0 44.337213
rack (click) 280037 264300 35 580 0 0% 0 0 15.104089
ruby-json (click) 20323 18532 8 206 0 0% 0 0 5.615928
rubyboy (click) 702279 636268 154 6862 42 0% 0 0 166.250603
rubykon (click) 146229 162118 137 2070 3 0% 0 0 56.323599
sudoku (click) 51704 65882 7 870 0 0% 0 0 22.9561
tinygql (click) 300252 230272 59 1031 5 0% 0 0 27.458787
30k_ifelse (click) 6222887 5052688 9260 75477 0 0% 0 0 1921.527556
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 489.246865
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.077971
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.55489
fib (click) 2659 2995 3 30 0 0% 0 0 1.10988
getivar (click) 3789 6778 3 79 0 0% 0 0 1.934297
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.28692
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.823019
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.9576
object-new (click) 2406 2818 2 36 0 0% 0 0 1.061394
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.112032
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.831664
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.838925
send_cfunc_block (click) 14429 12201 5 192 0 0% 0 0 4.081297
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.462189
setivar (click) 2783 3726 3 46 0 0% 0 0 1.274543
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.44251
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.72551
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.433996
structaref (click) 4407 9095 3 88 0 0% 0 0 2.320991
structaset (click) 3926 5614 3 70 0 0% 0 0 1.721994
throw (click) 5953 4624 5 53 0 0% 0 0 1.797875

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.