Ruby Benchmarks

Details for Benchmarks at 2026-04-05 01:01:41 UTC

YJIT metrics from the ruby-bench suite using Ruby 3b6245536c.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 98.7% faster than CRuby 4.1.0dev
  • 7.1% faster than YJIT 3.4.7
On railsbench it is
  • 119.4% faster than CRuby 4.1.0dev
  • 15.0% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 2 minutes
aarch64 runtime: 7 hours, 51 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 95 50 199 50 240
chunky-png 5 32 5 30 50 33 50 28
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 422 5 428 50 621 50 638
liquid-compile 5 418 5 480 50 582 50 739
liquid-render 5 173 5 173 50 432 50 438
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 201 50 254 50 291
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 155 50 246 50 259
ruby-lsp 5 157 5 167 50 238 50 240
sequel 5 422 5 431 50 583 50 600
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 27 50 12 50 10
addressable-getters 5 164 5 166 50 183 50 198
addressable-join 5 74 5 79 50 65 50 73
addressable-merge 5 161 5 152 50 223 50 223
addressable-new 5 350 5 341 50 520 50 526
addressable-normalize 5 53 5 54 50 60 50 58
addressable-parse 5 104 5 103 50 103 50 111
addressable-setters 5 185 5 175 50 233 50 229
addressable-to-s 5 164 5 166 50 182 50 198
binarytrees 5 82 5 84 50 136 50 161
blurhash 5 84 5 84 50 145 50 145
erubi 5 141 5 146 50 129 50 150
etanni 5 100 5 78 50 72 50 45
fannkuchredux 5 55 5 56 50 101 50 103
fluentd 5 55 5 60 50 21 50 32
gcbench 5 10 5 10 50 10 50 16
graphql 5 370 5 440 50 564 50 963
graphql-native 5 57 5 88 50 22 50 68
knucleotide 5 163 5 141 50 117 50 95
lee 5 23 5 29 50 10 50 11
matmul 5 53 5 56 50 88 50 97
nbody 5 250 5 265 50 663 50 703
nqueens 5 119 5 126 50 554 50 572
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 183 50 698 50 811
protoboeuf-encode 5 201 5 192 50 802 50 830
rack 5 444 5 430 50 720 50 683
ruby-json 5 84 5 105 50 50 50 80
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 208 5 222 50 250 50 283
sudoku 5 48 5 49 50 155 50 158
tinygql 5 41 5 41 50 40 50 52
30k_ifelse 5 28 5 28 50 185 50 184
30k_methods 5 38 5 39 50 455 50 460
attr_accessor 5 150 5 180 50 1834 50 1889
cfunc_itself 5 347 5 311 50 1255 50 1259
fib 5 125 5 134 50 939 50 939
getivar 5 216 5 291 50 2313 50 2406
getivar-module 5 103 5 129 50 89 50 264
keyword_args 5 103 5 103 50 1240 50 1243
loops-times 5 23 5 25 50 63 50 63
object-new 5 268 5 473 50 296 50 1482
object-new-initialize 5 168 5 248 50 259 50 941
object-new-no-escape 5 81 5 139 50 89 50 507
respond_to 5 139 5 131 50 3898 50 3895
ruby-xor 5 247 5 231 50 1305 50 1294
send_bmethod 5 118 5 114 50 5539 50 4526
send_cfunc_block 5 107 5 105 50 306 50 282
send_rubyfunc_block 5 196 5 204 50 1371 50 1376
setivar 5 359 5 469 50 4930 50 5037
setivar_object 5 341 5 348 50 766 50 668
setivar_young 5 341 5 347 50 807 50 694
str_concat 5 391 5 448 50 1201 50 1176
structaref 5 153 5 182 50 1800 50 1864
structaset 5 197 5 220 50 369 50 477
throw 5 1113 5 1358 50 1443 50 1728

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) 1553582 1374213 203 2669 0 0% 0 0 75.056373
chunky-png (click) 320775 303517 79 1376 1 0% 0 0 38.722645
erubi-rails (click) 1386555 1263316 269 3698 23 0% 0 0 96.611988
hexapdf (click) 1518830 1367997 594 15716 44 0% 0 0 430.785116
liquid-c (click) 562603 466669 114 2236 5 0% 0 0 59.105386
liquid-compile (click) 476406 423159 146 2759 2 0% 0 0 79.942197
liquid-render (click) 658161 584037 131 2959 8 0% 0 0 78.376584
lobsters (click) 8694708 7215554 3127 64295 122 0% 0 0 2080.742729
mail (click) 874335 856713 345 7728 40 0% 0 0 208.943341
psych-load (click) 291926 226845 61 840 2 0% 0 0 23.624117
railsbench (click) 3332212 2844517 1579 19467 76 0% 0 0 532.514488
rubocop (click) 5783613 5023618 3002 57118 127 0% 6 0 1627.944878
ruby-lsp (click) 1040557 859988 408 7436 46 0% 1 0 200.191165
sequel (click) 499072 428796 11 119 0 0% 0 0 3.980078
shipit (click) 6943954 5874239 3135 50584 147 0% 0 0 1636.749717
addressable-equality (click) 322136 265005 44 1396 1 0% 0 0 32.981586
addressable-getters (click) 279934 237439 26 869 0 0% 0 0 21.220626
addressable-join (click) 286508 238706 24 945 0 0% 0 0 23.919028
addressable-merge (click) 287446 242967 27 900 0 0% 0 0 22.169022
addressable-new (click) 261238 238667 21 569 0 0% 0 0 14.184017
addressable-normalize (click) 318395 277285 43 1352 1 0% 0 0 31.842832
addressable-parse (click) 284007 240486 26 886 0 0% 0 0 21.955093
addressable-setters (click) 261284 208953 20 584 0 0% 0 0 15.505183
addressable-to-s (click) 288646 230519 26 971 0 0% 0 0 23.749493
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.758252
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.830931
erubi (click) 250952 190527 6 134 0 0% 0 0 3.869821
etanni (click) 32744 34339 8 114 0 0% 0 0 3.455462
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.842135
fluentd (click) 491301 439000 7 116 0 0% 0 0 3.756175
gcbench (click) 15808 8981 9 110 0 0% 0 0 3.431992
graphql (click) 414338 353033 73 1917 19 0% 0 0 52.937095
graphql-native (click) 358104 335342 39 532 0 0% 0 0 13.668809
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.694911
lee (click) 321659 313816 49 1099 0 0% 0 0 30.858333
matmul (click) 11103 4709 8 136 0 0% 0 0 4.122766
nbody (click) 14448 21176 6 251 0 0% 0 0 6.136255
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.195151
optcarrot (click) 319416 277986 188 4589 34 0% 0 0 106.242008
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.84832
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 43.288871
rack (click) 291949 227846 35 633 0 0% 0 0 16.291324
ruby-json (click) 19462 17420 8 206 0 0% 0 0 5.776567
rubyboy (click) 708879 617623 154 6873 42 0% 0 0 165.12821
rubykon (click) 148777 155950 138 2107 4 0% 0 0 55.584806
splay (click) 34953 22682 9 175 0 0% 0 0 5.242314
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.806211
tinygql (click) 305627 275467 59 1040 5 0% 0 0 27.28741
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1865.504158
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 476.604721
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.105819
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.517104
fib (click) 2659 2995 3 30 0 0% 0 0 1.101549
getivar (click) 3789 6778 3 79 0 0% 0 0 1.926863
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.346153
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.846907
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.870658
object-new (click) 2406 2818 2 36 0 0% 0 0 1.002795
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.298234
object-new-no-escape (click) 4540 5102 5 68 0 0% 0 0 2.002998
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.158648
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.796525
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.806178
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.325632
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.751241
setivar (click) 2783 3726 3 46 0 0% 0 0 1.232693
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.408793
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.736358
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.3951
structaref (click) 4407 9095 3 88 0 0% 0 0 2.335
structaset (click) 4113 5834 3 70 0 0% 0 0 1.824309
throw (click) 5953 4624 5 53 0 0% 0 0 1.746243

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.