Ruby Benchmarks

Details for Benchmarks at 2026-02-22 00:53:20 UTC

YJIT metrics from the ruby-bench suite using Ruby 60082aa9f7.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 94.5% faster than CRuby 4.1.0dev
  • 6.7% faster than YJIT 3.4.7
On railsbench it is
  • 113.9% faster than CRuby 4.1.0dev
  • 12.1% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 24 minutes
aarch64 runtime: 7 hours, 17 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 100 50 199 50 239
chunky-png 5 31 5 33 50 33 50 27
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 418 5 427 50 625 50 638
liquid-compile 5 419 5 481 50 582 50 736
liquid-render 5 172 5 175 50 428 50 446
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 194 50 253 50 265
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 159 50 246 50 251
ruby-lsp 5 161 5 164 50 216 50 234
sequel 5 426 5 437 50 591 50 603
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 28 50 11 50 14
addressable-getters 5 163 5 173 50 184 50 203
addressable-join 5 72 5 80 50 65 50 75
addressable-merge 5 158 5 160 50 221 50 226
addressable-new 5 351 5 358 50 523 50 534
addressable-normalize 5 53 5 55 50 59 50 64
addressable-parse 5 104 5 107 50 103 50 114
addressable-setters 5 182 5 187 50 232 50 243
addressable-to-s 5 163 5 172 50 182 50 202
binarytrees 5 82 5 86 50 136 50 147
blurhash 5 83 5 85 50 143 50 145
erubi 5 134 5 147 50 138 50 149
etanni 5 99 5 71 50 71 50 38
fannkuchredux 5 55 5 57 50 101 50 103
fluentd 5 56 5 62 50 20 50 32
graphql 5 370 5 467 50 570 50 933
graphql-native 5 58 5 86 50 22 50 63
knucleotide 5 163 5 160 50 118 50 114
lee 5 23 5 23 50 10 50 10
matmul 5 51 5 56 50 94 50 95
nbody 5 245 5 295 50 679 50 702
nqueens 5 116 5 126 50 556 50 579
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 183 50 706 50 767
protoboeuf-encode 5 197 5 199 50 830 50 798
rack 5 439 5 458 50 712 50 721
ruby-json 5 81 5 101 50 46 50 77
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
sudoku 5 48 5 49 50 157 50 157
tinygql 5 41 5 43 50 40 50 52
30k_ifelse 5 28 5 28 50 185 50 184
30k_methods 5 38 5 40 50 456 50 455
attr_accessor 5 157 5 193 50 1835 50 1911
cfunc_itself 5 348 5 352 50 1255 50 1259
fib 5 124 5 140 50 939 50 939
getivar 5 216 5 334 50 2313 50 2435
getivar-module 5 104 5 144 50 90 50 272
keyword_args 5 99 5 102 50 1240 50 1243
loops-times 5 23 5 26 50 64 50 63
object-new 5 268 5 410 50 296 50 904
respond_to 5 139 5 138 50 3888 50 3902
ruby-xor 5 230 5 253 50 1313 50 1297
send_bmethod 5 116 5 124 50 5539 50 4527
send_cfunc_block 5 106 5 103 50 353 50 382
send_rubyfunc_block 5 248 5 249 50 6925 50 6929
setivar 5 359 5 482 50 4923 50 5045
setivar_object 5 341 5 306 50 754 50 643
setivar_young 5 341 5 309 50 799 50 662
str_concat 5 391 5 455 50 1202 50 1171
structaref 5 156 5 209 50 1812 50 1896
structaset 5 204 5 267 50 401 50 501
throw 5 1087 5 1450 50 1420 50 1884

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) 1547634 1295829 203 2641 0 0% 0 0 74.967074
chunky-png (click) 318988 285061 79 1376 1 0% 0 0 39.288909
erubi-rails (click) 1383640 1156733 268 3690 22 0% 0 0 100.5953
hexapdf (click) 1521197 1274818 594 15711 44 0% 0 0 441.999328
liquid-c (click) 553999 540006 114 2236 5 0% 0 0 59.729251
liquid-compile (click) 471953 453491 146 2715 2 0% 0 0 79.834743
liquid-render (click) 663898 577519 131 2959 8 0% 0 0 79.577878
lobsters (click) 8708989 7302106 3123 64368 120 0% 0 0 2119.209479
mail (click) 872192 782006 345 7728 40 0% 0 0 214.465314
psych-load (click) 286286 262823 61 831 2 0% 0 0 24.116138
railsbench (click) 3347747 2928918 1592 19703 97 0% 0 0 553.995449
rubocop (click) 5788973 5005816 3002 57195 125 0% 6 0 1672.439714
ruby-lsp (click) 1039048 949604 409 7484 47 0% 1 0 205.38436
sequel (click) 493179 401274 11 119 0 0% 0 0 3.915698
shipit (click) 7131291 6044814 3298 52102 169 0% 0 0 1724.581622
addressable-equality (click) 316261 291561 44 1380 1 0% 0 0 34.732826
addressable-getters (click) 276598 250912 26 863 0 0% 0 0 20.967323
addressable-join (click) 281958 251145 24 941 0 0% 0 0 23.550649
addressable-merge (click) 283285 247533 27 898 0 0% 0 0 22.966437
addressable-new (click) 250135 219328 21 591 0 0% 0 0 14.741058
addressable-normalize (click) 312698 255459 43 1327 1 0% 0 0 32.887756
addressable-parse (click) 275889 256938 26 882 0 0% 0 0 21.933988
addressable-setters (click) 255995 211817 20 582 0 0% 0 0 14.434739
addressable-to-s (click) 268044 232493 26 849 0 0% 0 0 20.830148
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.841387
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.229332
erubi (click) 248439 239112 6 134 0 0% 0 0 3.866221
etanni (click) 33355 27108 8 114 0 0% 0 0 3.450375
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.127651
fluentd (click) 488259 436546 7 116 0 0% 0 0 3.740955
graphql (click) 397191 351726 73 1909 18 0% 0 0 54.169084
graphql-native (click) 353990 331714 39 532 0 0% 0 0 14.25826
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.957514
lee (click) 317686 243489 49 1102 0 0% 0 0 31.273485
matmul (click) 11103 4709 8 136 0 0% 0 0 4.177542
nbody (click) 14448 21176 6 251 0 0% 0 0 6.089922
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.350118
optcarrot (click) 319416 277986 188 4589 34 0% 0 0 108.411348
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 73.803806
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 44.049223
rack (click) 283854 292652 35 581 0 0% 0 0 15.046956
ruby-json (click) 20323 18532 8 206 0 0% 0 0 5.743061
rubyboy (click) 703235 620405 154 6877 42 0% 0 0 168.859312
rubykon (click) 150715 174889 138 2130 4 0% 0 0 57.58688
sudoku (click) 51776 65830 7 871 0 0% 0 0 23.164095
tinygql (click) 298661 260734 59 1031 5 0% 0 0 27.178571
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1961.907033
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 494.27911
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.065145
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.486878
fib (click) 2659 2995 3 30 0 0% 0 0 1.106065
getivar (click) 3789 6778 3 79 0 0% 0 0 1.931897
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.297588
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.850509
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.923695
object-new (click) 2406 2818 2 36 0 0% 0 0 1.043095
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.123583
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.794996
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.797479
send_cfunc_block (click) 13777 10257 5 192 0 0% 0 0 3.777497
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.467208
setivar (click) 2783 3726 3 46 0 0% 0 0 1.297436
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.422174
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.709233
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.428561
structaref (click) 4407 9095 3 88 0 0% 0 0 2.341771
structaset (click) 4113 5834 3 70 0 0% 0 0 1.798168
throw (click) 5953 4624 5 53 0 0% 0 0 1.739398

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.