Ruby Benchmarks

Details for Benchmarks at 2025-12-13 00:39:55 UTC

YJIT metrics from the ruby-bench suite using Ruby 8f81d2b5c3.

Using the geomean of the headline benchmarks for x86 YJIT 4.0.0dev is
  • 94.9% faster than CRuby 4.0.0dev
  • 3.6% faster than YJIT 3.4.7
On railsbench it is
  • 112.3% faster than CRuby 4.0.0dev
  • 10.1% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 8 minutes
aarch64 runtime: 7 hours, 4 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 97 50 197 50 237
chunky-png 5 31 5 33 50 33 50 28
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 420 5 428 50 629 50 630
liquid-compile 5 419 5 453 50 585 50 673
liquid-render 5 173 5 175 50 430 50 420
lobsters 5 20 5 20 50 10 50 10
mail 5 195 5 186 50 253 50 246
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 153 5 159 50 245 50 250
ruby-lsp 5 142 5 149 50 246 50 244
sequel 5 429 5 426 50 598 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 162 50 183 50 179
addressable-join 5 73 5 75 50 65 50 64
addressable-merge 5 160 5 152 50 222 50 205
addressable-new 5 354 5 343 50 521 50 500
addressable-normalize 5 53 5 52 50 59 50 52
addressable-parse 5 104 5 101 50 104 50 102
addressable-setters 5 183 5 173 50 231 50 208
addressable-to-s 5 163 5 163 50 182 50 179
binarytrees 5 82 5 84 50 136 50 134
blurhash 5 83 5 86 50 143 50 145
erubi 5 139 5 143 50 135 50 139
etanni 5 98 5 69 50 71 50 33
fannkuchredux 5 55 5 56 50 102 50 97
fluentd 5 56 5 63 50 29 50 29
graphql 5 368 5 461 50 569 50 919
graphql-native 5 58 5 83 50 23 50 57
knucleotide 5 163 5 153 50 117 50 106
lee 5 23 5 23 50 10 50 10
matmul 5 51 5 55 50 94 50 92
nbody 5 247 5 282 50 676 50 705
nqueens 5 116 5 124 50 556 50 567
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 181 50 706 50 630
protoboeuf-encode 5 197 5 203 50 829 50 804
rack 5 441 5 432 50 720 50 656
ruby-json 5 84 5 95 50 46 50 62
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 48 50 156 50 152
tinygql 5 41 5 43 50 40 50 47
30k_ifelse 5 28 5 28 50 185 50 181
30k_methods 5 38 5 39 50 457 50 449
attr_accessor 5 158 5 223 50 1835 50 1958
cfunc_itself 5 349 5 349 50 1255 50 1259
fib 5 124 5 140 50 939 50 939
getivar 5 211 5 348 50 2316 50 2444
getivar-module 5 104 5 144 50 90 50 271
keyword_args 5 100 5 107 50 1240 50 1243
loops-times 5 23 5 26 50 64 50 52
object-new 5 268 5 355 50 298 50 668
respond_to 5 139 5 139 50 3890 50 3897
ruby-xor 5 237 5 254 50 1314 50 1293
send_bmethod 5 116 5 125 50 5539 50 5543
send_cfunc_block 5 105 5 107 50 353 50 344
send_rubyfunc_block 5 249 5 243 50 6921 50 6929
setivar 5 360 5 396 50 4927 50 4975
setivar_object 5 341 5 358 50 748 50 587
setivar_young 5 341 5 359 50 795 50 619
str_concat 5 391 5 449 50 1199 50 1135
structaref 5 156 5 232 50 1811 50 1937
structaset 5 203 5 222 50 395 50 353
throw 5 1088 5 1261 50 1409 50 1594

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) 1545144 1322565 203 2641 0 0% 0 0 74.98558
chunky-png (click) 321174 304175 79 1373 1 0% 0 0 39.105286
erubi-rails (click) 1371200 1263152 269 3635 22 0% 0 0 96.719545
hexapdf (click) 1525031 1347128 593 15658 44 0% 0 0 437.67505
liquid-c (click) 557952 497336 114 2228 5 0% 0 0 60.08188
liquid-compile (click) 480686 424696 146 2738 2 0% 0 0 79.512194
liquid-render (click) 663157 586733 131 2946 8 0% 0 0 79.278014
lobsters (click) 8683099 7295240 3114 64242 117 0% 0 0 2114.421394
mail (click) 866428 835885 342 7700 40 0% 0 0 212.534646
psych-load (click) 287718 265041 61 828 2 0% 0 0 24.077915
railsbench (click) 3339139 2875048 1590 19687 97 0% 0 0 551.192678
rubocop (click) 5759393 5012620 3002 56850 127 0% 6 0 1657.818751
ruby-lsp (click) 959195 830115 342 6701 44 0% 1 0 179.640841
sequel (click) 502155 389287 11 119 0 0% 0 0 4.247887
shipit (click) 7739242 6438388 3349 53583 181 0% 1 0 1781.973075
addressable-equality (click) 319978 279902 44 1407 1 0% 0 0 34.632009
addressable-getters (click) 286095 229296 26 987 0 0% 0 0 23.347202
addressable-join (click) 289313 235604 24 1005 0 0% 0 0 24.994918
addressable-merge (click) 284352 232128 27 896 0 0% 0 0 22.389459
addressable-new (click) 259734 222284 21 579 0 0% 0 0 14.533176
addressable-normalize (click) 314279 265449 43 1353 1 0% 0 0 33.055215
addressable-parse (click) 281669 255700 26 880 0 0% 0 0 21.58615
addressable-setters (click) 259785 207682 20 582 0 0% 0 0 14.727373
addressable-to-s (click) 280526 222443 26 889 0 0% 0 0 21.338586
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.818928
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.786508
erubi (click) 247636 206220 6 134 0 0% 0 0 3.918097
etanni (click) 33385 36322 8 114 0 0% 0 0 3.611104
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.83313
fluentd (click) 485325 442852 7 115 0 0% 0 0 3.78128
graphql (click) 409936 352669 73 1921 19 0% 0 0 54.324627
graphql-native (click) 357567 271617 39 532 0 0% 0 0 14.12429
knucleotide (click) 9997 11103 7 113 0 0% 0 0 6.470058
lee (click) 317962 288031 49 1097 0 0% 0 0 31.598747
matmul (click) 11103 4709 8 136 0 0% 0 0 4.317196
nbody (click) 14448 21176 6 251 0 0% 0 0 6.057255
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.250912
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 111.070313
protoboeuf (click) 170129 177717 12 2837 0 0% 0 0 72.685085
protoboeuf-encode (click) 243065 283735 14 1816 0 0% 0 0 44.622821
rack (click) 283340 235950 35 626 0 0% 0 0 16.573914
ruby-json (click) 20323 18532 8 206 0 0% 0 0 5.637916
rubyboy (click) 703818 646138 154 6862 42 0% 0 0 166.842378
rubykon (click) 146441 162602 137 2076 3 0% 0 0 56.370173
sudoku (click) 52278 66593 7 878 0 0% 0 0 23.243895
tinygql (click) 299868 270533 59 1025 5 0% 0 0 26.962617
30k_ifelse (click) 6222887 5052688 9260 75477 0 0% 0 0 1932.536468
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 487.148908
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.11284
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.568043
fib (click) 2659 2995 3 30 0 0% 0 0 1.185112
getivar (click) 3789 6778 3 79 0 0% 0 0 1.944926
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.295072
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.803767
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.932002
object-new (click) 2406 2818 2 36 0 0% 0 0 1.049539
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.176219
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.812162
send_bmethod (click) 5238 4968 6 71 0 0% 0 0 1.783996
send_cfunc_block (click) 14669 12471 5 195 0 0% 0 0 4.263658
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.478616
setivar (click) 2783 3726 3 46 0 0% 0 0 1.283423
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.429292
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.737598
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.458373
structaref (click) 4407 9095 3 88 0 0% 0 0 2.348426
structaset (click) 3926 5614 3 70 0 0% 0 0 1.753824
throw (click) 5953 4624 5 53 0 0% 0 0 1.737637

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.