Ruby Benchmarks

Details for Benchmarks at 2025-12-23 00:42:19 UTC

YJIT metrics from the ruby-bench suite using Ruby 0b3199a653.

Using the geomean of the headline benchmarks for x86 YJIT 4.0.0dev is
  • 95.5% faster than CRuby 4.0.0dev
  • 5.2% faster than YJIT 3.4.7
On railsbench it is
  • 112.9% faster than CRuby 4.0.0dev
  • 9.8% 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 90 5 98 50 197 50 237
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 421 5 425 50 624 50 632
liquid-compile 5 419 5 472 50 585 50 717
liquid-render 5 171 5 171 50 436 50 423
lobsters 5 20 5 20 50 10 50 10
mail 5 195 5 197 50 253 50 263
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 157 50 246 50 243
ruby-lsp 5 138 5 147 50 241 50 246
sequel 5 422 5 435 50 590 50 602
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 26 50 12 50 10
addressable-getters 5 165 5 167 50 184 50 190
addressable-join 5 73 5 74 50 65 50 70
addressable-merge 5 159 5 152 50 223 50 217
addressable-new 5 349 5 343 50 525 50 517
addressable-normalize 5 53 5 53 50 59 50 57
addressable-parse 5 103 5 103 50 104 50 106
addressable-setters 5 183 5 179 50 229 50 231
addressable-to-s 5 163 5 165 50 183 50 189
binarytrees 5 82 5 85 50 136 50 137
blurhash 5 81 5 87 50 143 50 145
erubi 5 139 5 141 50 127 50 141
etanni 5 98 5 65 50 70 50 33
fannkuchredux 5 54 5 57 50 102 50 103
fluentd 5 56 5 62 50 20 50 30
graphql 5 359 5 473 50 570 50 927
graphql-native 5 58 5 87 50 23 50 66
knucleotide 5 163 5 157 50 118 50 112
lee 5 23 5 23 50 10 50 10
matmul 5 51 5 50 50 94 50 95
nbody 5 246 5 258 50 676 50 706
nqueens 5 116 5 121 50 556 50 588
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 181 50 706 50 703
protoboeuf-encode 5 198 5 197 50 835 50 778
rack 5 442 5 449 50 709 50 694
ruby-json 5 82 5 97 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 42 5 44 50 35 50 47
30k_ifelse 5 28 5 28 50 185 50 180
30k_methods 5 38 5 40 50 457 50 453
attr_accessor 5 157 5 199 50 1835 50 1926
cfunc_itself 5 347 5 354 50 1255 50 1259
fib 5 124 5 139 50 939 50 940
getivar 5 213 5 320 50 2313 50 2427
getivar-module 5 104 5 140 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 361 50 291 50 672
respond_to 5 139 5 138 50 3889 50 3908
ruby-xor 5 237 5 242 50 1314 50 1290
send_bmethod 5 116 5 121 50 5538 50 4527
send_cfunc_block 5 106 5 106 50 353 50 343
send_rubyfunc_block 5 250 5 249 50 6923 50 6926
setivar 5 360 5 468 50 4925 50 5038
setivar_object 5 337 5 334 50 750 50 616
setivar_young 5 342 5 335 50 799 50 637
str_concat 5 390 5 428 50 1199 50 1126
structaref 5 157 5 196 50 1811 50 1895
structaset 5 202 5 260 50 397 50 517
throw 5 1089 5 1288 50 1416 50 1550

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) 1542847 1337318 203 2639 0 0% 0 0 75.872636
chunky-png (click) 320682 312279 79 1373 1 0% 0 0 38.958646
erubi-rails (click) 1362896 1147259 268 3632 22 0% 0 0 96.737937
hexapdf (click) 1524351 1356181 594 15656 44 0% 0 0 437.283078
liquid-c (click) 555240 437048 114 2228 5 0% 0 0 59.403168
liquid-compile (click) 481574 407593 146 2734 2 0% 0 0 79.12554
liquid-render (click) 663506 595698 131 2946 8 0% 0 0 79.665653
lobsters (click) 8696399 7373604 3125 64208 117 0% 0 0 2114.884895
mail (click) 866125 835304 345 7721 40 0% 0 0 214.594106
psych-load (click) 278993 238500 61 828 2 0% 0 0 23.575366
railsbench (click) 3345097 2955312 1591 19731 97 0% 0 0 553.571932
rubocop (click) 5768212 4875285 3002 56931 126 0% 6 0 1661.001793
ruby-lsp (click) 949855 828751 343 6744 45 0% 1 0 182.644664
sequel (click) 501466 421307 11 119 0 0% 0 0 4.182212
shipit (click) 7530974 6238748 3281 51997 182 0% 0 0 1719.978209
addressable-equality (click) 318843 237848 44 1381 1 0% 0 0 34.106988
addressable-getters (click) 281278 224201 26 905 0 0% 0 0 21.907318
addressable-join (click) 283489 244748 24 941 0 0% 0 0 23.472557
addressable-merge (click) 284556 240801 27 896 0 0% 0 0 22.264794
addressable-new (click) 259553 205757 21 565 0 0% 0 0 14.494671
addressable-normalize (click) 312718 288056 43 1330 1 0% 0 0 32.949618
addressable-parse (click) 281868 239817 26 880 0 0% 0 0 21.631501
addressable-setters (click) 258539 230706 20 582 0 0% 0 0 14.583463
addressable-to-s (click) 277716 227012 26 849 0 0% 0 0 20.659287
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.856429
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.811764
erubi (click) 248114 206969 6 134 0 0% 0 0 3.951382
etanni (click) 33287 36246 8 113 0 0% 0 0 3.491683
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.85161
fluentd (click) 485508 393529 7 115 0 0% 0 0 3.759159
graphql (click) 410318 345087 73 1921 19 0% 0 0 53.600822
graphql-native (click) 353757 268955 39 532 0 0% 0 0 13.966993
knucleotide (click) 9997 11103 7 113 0 0% 0 0 6.26854
lee (click) 309242 244998 49 1097 0 0% 0 0 31.511771
matmul (click) 11103 4709 8 136 0 0% 0 0 4.250727
nbody (click) 14448 21176 6 251 0 0% 0 0 6.169966
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.368467
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 111.25125
protoboeuf (click) 169555 177006 12 2829 0 0% 0 0 72.075386
protoboeuf-encode (click) 242967 283659 14 1815 0 0% 0 0 44.265388
rack (click) 282141 259141 35 626 0 0% 0 0 16.34329
ruby-json (click) 19868 17928 8 206 0 0% 0 0 5.647191
rubyboy (click) 703647 604635 154 6864 42 0% 0 0 167.059981
rubykon (click) 146869 163015 137 2080 3 0% 0 0 56.601502
sudoku (click) 51704 65882 7 870 0 0% 0 0 23.093631
tinygql (click) 299208 261403 59 1031 5 0% 0 0 26.783022
30k_ifelse (click) 6222887 5052688 9260 75477 0 0% 0 0 1926.234973
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 495.222577
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.118506
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.536631
fib (click) 2659 2995 3 30 0 0% 0 0 1.128245
getivar (click) 3789 6778 3 79 0 0% 0 0 1.976676
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.330631
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.832673
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.950976
object-new (click) 2406 2818 2 36 0 0% 0 0 1.040033
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.135008
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.837325
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.863127
send_cfunc_block (click) 14429 12201 5 192 0 0% 0 0 4.15409
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.48941
setivar (click) 2783 3726 3 46 0 0% 0 0 1.279065
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.415579
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.76478
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.450089
structaref (click) 4407 9095 3 88 0 0% 0 0 2.366826
structaset (click) 3926 5614 3 70 0 0% 0 0 1.76466
throw (click) 5953 4624 5 53 0 0% 0 0 1.85032

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.