Ruby Benchmarks

Details for Benchmarks at 2025-12-05 00:41:25 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 4.0.0dev is
  • 88.3% faster than CRuby 4.0.0dev
  • 1.8% slower than YJIT 3.4.7
On railsbench it is
  • 100.9% faster than CRuby 4.0.0dev
  • 2.3% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 12 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 84 5 86 50 194 50 217
chunky-png 5 31 5 33 50 33 50 29
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 425 5 382 50 623 50 546
liquid-compile 5 418 5 474 50 579 50 714
liquid-render 5 172 5 168 50 414 50 367
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 150 50 253 50 148
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 250
ruby-lsp 5 141 5 148 50 241 50 247
sequel 5 420 5 440 50 584 50 617
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 27 50 11 50 10
addressable-getters 5 164 5 166 50 184 50 186
addressable-join 5 71 5 54 50 66 50 19
addressable-merge 5 160 5 153 50 222 50 209
addressable-new 5 353 5 332 50 524 50 493
addressable-normalize 5 53 5 54 50 59 50 56
addressable-parse 5 103 5 102 50 104 50 103
addressable-setters 5 184 5 177 50 229 50 214
addressable-to-s 5 163 5 166 50 182 50 186
binarytrees 5 82 5 83 50 136 50 131
blurhash 5 83 5 87 50 143 50 145
erubi 5 135 5 139 50 128 50 137
etanni 5 98 5 69 50 71 50 35
fannkuchredux 5 54 5 48 50 102 50 81
fluentd 5 56 5 60 50 20 50 26
graphql 5 371 5 459 50 571 50 919
graphql-native 5 59 5 79 50 23 50 66
knucleotide 5 163 5 164 50 117 50 118
lee 5 22 5 23 50 10 50 10
matmul 5 51 5 52 50 94 50 90
nbody 5 247 5 262 50 676 50 701
nqueens 5 116 5 121 50 556 50 559
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 173 5 187 50 706 50 770
protoboeuf-encode 5 195 5 208 50 829 50 824
rack 5 441 5 444 50 707 50 693
ruby-json 5 83 5 99 50 51 50 70
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 48 50 157 50 147
tinygql 5 41 5 44 50 39 50 48
30k_ifelse 5 28 5 28 50 185 50 184
30k_methods 5 38 5 40 50 454 50 458
attr_accessor 5 157 5 213 50 1836 50 1946
cfunc_itself 5 346 5 364 50 1255 50 1259
fib 5 124 5 140 50 939 50 940
getivar 5 212 5 334 50 2312 50 2437
getivar-module 5 104 5 144 50 90 50 268
keyword_args 5 100 5 107 50 1240 50 1243
loops-times 5 23 5 26 50 64 50 56
object-new 5 268 5 319 50 297 50 501
respond_to 5 139 5 136 50 3890 50 3904
ruby-xor 5 237 5 256 50 1314 50 1290
send_bmethod 5 117 5 125 50 5538 50 5543
send_cfunc_block 5 107 5 103 50 353 50 331
send_rubyfunc_block 5 249 5 256 50 6923 50 6931
setivar 5 360 5 391 50 4928 50 4973
setivar_object 5 342 5 335 50 748 50 608
setivar_young 5 341 5 338 50 799 50 642
str_concat 5 397 5 452 50 1202 50 1135
structaref 5 157 5 208 50 1809 50 1912
structaset 5 200 5 212 50 399 50 348
throw 5 1088 5 1176 50 1406 50 1424

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) 1548199 1273237 205 2579 0 0% 0 0 73.061415
chunky-png (click) 309430 283818 79 1373 1 0% 0 0 38.982547
erubi-rails (click) 1377635 1190642 268 3663 22 0% 0 0 99.28731
hexapdf (click) 1524746 1348919 593 15673 44 0% 0 0 447.545318
liquid-c (click) 545949 476083 114 2228 5 0% 0 0 61.077318
liquid-compile (click) 479014 406994 146 2717 2 0% 0 0 79.406182
liquid-render (click) 663219 538288 131 2946 8 0% 0 0 80.861325
lobsters (click) 8535364 7145278 3100 62480 118 0% 0 0 2108.413246
mail (click) 862370 864379 342 7705 40 0% 0 0 214.925554
psych-load (click) 288657 266573 61 828 2 0% 0 0 23.372176
railsbench (click) 3356342 2777477 1605 19602 47 0% 0 0 549.244308
rubocop (click) 5760851 4965957 3001 56855 127 0% 6 0 1659.578088
ruby-lsp (click) 959227 822547 342 6701 44 0% 1 0 182.503577
sequel (click) 503504 440488 11 119 0 0% 0 0 4.064071
shipit (click) 7720317 6599601 3344 53276 181 0% 1 0 1770.297656
addressable-equality (click) 318915 262911 44 1381 1 0% 0 0 34.329921
addressable-getters (click) 279558 246942 26 863 0 0% 0 0 21.07657
addressable-join (click) 284966 222667 24 941 0 0% 0 0 23.46852
addressable-merge (click) 285153 241815 27 898 0 0% 0 0 22.358677
addressable-new (click) 259828 214541 21 563 0 0% 0 0 13.877323
addressable-normalize (click) 314616 258264 43 1328 1 0% 0 0 32.420629
addressable-parse (click) 270483 235820 26 880 0 0% 0 0 21.71209
addressable-setters (click) 260018 225009 20 582 0 0% 0 0 14.296981
addressable-to-s (click) 279166 221320 26 849 0 0% 0 0 20.625727
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.832033
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.091226
erubi (click) 248592 240500 6 134 0 0% 0 0 4.036199
etanni (click) 32930 35718 8 114 0 0% 0 0 3.608738
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.038015
fluentd (click) 489451 424798 7 115 0 0% 0 0 3.768666
graphql (click) 397491 364233 73 1897 18 0% 0 0 52.753944
graphql-native (click) 355239 312443 39 532 0 0% 0 0 13.783275
knucleotide (click) 9997 11103 7 113 0 0% 0 0 5.84329
lee (click) 318622 313920 49 1097 0 0% 0 0 31.475215
matmul (click) 11103 4709 8 136 0 0% 0 0 4.180611
nbody (click) 14448 21176 6 251 0 0% 0 0 6.15514
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.485967
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 110.441422
protoboeuf (click) 170129 185909 12 2837 0 0% 0 0 72.306309
protoboeuf-encode (click) 243065 291927 14 1816 0 0% 0 0 44.232703
rack (click) 281444 265912 35 580 0 0% 0 0 15.898034
ruby-json (click) 19868 17928 8 206 0 0% 0 0 5.730371
rubyboy (click) 704154 638718 154 6864 42 0% 0 0 166.850128
rubykon (click) 146229 153926 137 2070 3 0% 0 0 55.581009
sudoku (click) 52278 66593 7 878 0 0% 0 0 23.530737
tinygql (click) 300933 288546 59 1031 5 0% 0 0 27.237963
30k_ifelse (click) 6222887 5052688 9260 75477 0 0% 0 0 1925.867237
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 494.473037
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.095877
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.489969
fib (click) 2659 2995 3 30 0 0% 0 0 1.152119
getivar (click) 3789 6778 3 79 0 0% 0 0 1.945921
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.301627
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.821646
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.918537
object-new (click) 2406 2818 2 36 0 0% 0 0 1.135357
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.182037
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.87259
send_bmethod (click) 5238 4968 6 71 0 0% 0 0 1.707142
send_cfunc_block (click) 14669 12471 5 195 0 0% 0 0 4.371698
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.477121
setivar (click) 2783 3726 3 46 0 0% 0 0 1.270542
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.427479
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.717887
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.430766
structaref (click) 4407 9095 3 88 0 0% 0 0 2.358058
structaset (click) 3926 5614 3 70 0 0% 0 0 1.763766
throw (click) 5953 4624 5 53 0 0% 0 0 1.807131

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.