Ruby Benchmarks

Details for Benchmarks at 2026-03-12 00:46:13 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 94.6% faster than CRuby 4.1.0dev
  • 6.9% faster than YJIT 3.4.7
On railsbench it is
  • 115.0% faster than CRuby 4.1.0dev
  • 13.7% faster than YJIT 3.4.7
x86_64 runtime: 10 hours, 2 minutes
aarch64 runtime: 7 hours, 52 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 91 5 99 50 189 50 244
chunky-png 5 31 5 33 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 421 5 433 50 626 50 651
liquid-compile 5 418 5 478 50 584 50 725
liquid-render 5 169 5 176 50 435 50 440
lobsters 5 20 5 20 50 10 50 10
mail 5 195 5 193 50 253 50 277
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 153 5 161 50 246 50 255
ruby-lsp 5 159 5 164 50 226 50 231
sequel 5 426 5 434 50 591 50 613
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 28 50 11 50 13
addressable-getters 5 164 5 173 50 183 50 200
addressable-join 5 73 5 80 50 66 50 75
addressable-merge 5 159 5 163 50 221 50 229
addressable-new 5 354 5 357 50 526 50 526
addressable-normalize 5 53 5 54 50 59 50 62
addressable-parse 5 104 5 107 50 104 50 115
addressable-setters 5 184 5 190 50 230 50 244
addressable-to-s 5 163 5 172 50 181 50 204
binarytrees 5 82 5 87 50 136 50 147
blurhash 5 83 5 87 50 143 50 145
erubi 5 130 5 147 50 122 50 156
etanni 5 98 5 74 50 71 50 41
fannkuchredux 5 55 5 57 50 102 50 103
fluentd 5 56 5 64 50 20 50 30
gcbench 5 10 5 10 50 10 50 10
graphql 5 375 5 481 50 571 50 958
graphql-native 5 59 5 89 50 22 50 65
knucleotide 5 163 5 158 50 118 50 112
lee 5 23 5 31 50 10 50 10
matmul 5 51 5 50 50 94 50 97
nbody 5 246 5 272 50 676 50 702
nqueens 5 116 5 127 50 556 50 578
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 174 5 183 50 706 50 768
protoboeuf-encode 5 197 5 204 50 834 50 781
rack 5 436 5 453 50 710 50 718
ruby-json 5 84 5 102 50 46 50 77
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 210 5 230 50 244 50 288
sudoku 5 48 5 49 50 156 50 158
tinygql 5 41 5 44 50 40 50 49
30k_ifelse 5 28 5 28 50 185 50 183
30k_methods 5 38 5 41 50 457 50 455
attr_accessor 5 157 5 208 50 1835 50 1935
cfunc_itself 5 346 5 359 50 1255 50 1259
fib 5 124 5 141 50 939 50 940
getivar 5 216 5 291 50 2313 50 2403
getivar-module 5 104 5 124 50 90 50 258
keyword_args 5 100 5 105 50 1240 50 1243
loops-times 5 23 5 24 50 64 50 61
object-new 5 268 5 411 50 297 50 910
object-new-initialize 5 169 5 247 50 258 50 754
object-new-no-escape 5 80 5 130 50 90 50 369
respond_to 5 139 5 138 50 3892 50 3902
ruby-xor 5 237 5 246 50 1314 50 1300
send_bmethod 5 117 5 121 50 5538 50 4527
send_cfunc_block 5 106 5 107 50 352 50 384
send_rubyfunc_block 5 251 5 249 50 6923 50 6919
setivar 5 359 5 443 50 4924 50 5018
setivar_object 5 341 5 294 50 750 50 538
setivar_young 5 341 5 297 50 795 50 562
str_concat 5 390 5 445 50 1200 50 1172
structaref 5 156 5 198 50 1812 50 1888
structaset 5 201 5 256 50 399 50 496
throw 5 1091 5 1374 50 1415 50 1778

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) 1552536 1349673 203 2646 0 0% 0 0 75.192262
chunky-png (click) 323250 271893 79 1376 1 0% 0 0 39.259689
erubi-rails (click) 1375648 1131695 269 3627 22 0% 0 0 96.247302
hexapdf (click) 1527458 1290580 593 15729 44 0% 0 0 437.937478
liquid-c (click) 558504 512375 114 2236 5 0% 0 0 59.210628
liquid-compile (click) 480162 430161 146 2714 2 0% 0 0 79.506997
liquid-render (click) 662142 583985 131 2959 8 0% 0 0 79.742699
lobsters (click) 8702995 7364992 3126 64208 120 0% 0 0 2106.911411
mail (click) 871967 839013 345 7728 40 0% 0 0 213.66779
psych-load (click) 288579 257267 61 831 2 0% 0 0 23.752551
railsbench (click) 3352347 2901307 1592 19718 97 0% 0 0 550.89948
rubocop (click) 5781831 4965000 3002 57117 125 0% 6 0 1663.195248
ruby-lsp (click) 1036409 907210 408 7446 46 0% 1 0 204.933345
sequel (click) 503299 446860 11 119 0 0% 0 0 3.911386
shipit (click) 7128962 6011903 3303 52314 168 0% 0 0 1717.281087
addressable-equality (click) 317237 235793 44 1380 1 0% 0 0 34.175839
addressable-getters (click) 284756 227998 26 987 0 0% 0 0 23.628213
addressable-join (click) 273787 250112 24 941 0 0% 0 0 22.971255
addressable-merge (click) 274546 228726 27 898 0 0% 0 0 22.258338
addressable-new (click) 258230 228626 21 563 0 0% 0 0 14.104153
addressable-normalize (click) 306363 263909 43 1362 1 0% 0 0 33.414265
addressable-parse (click) 281134 238997 26 894 0 0% 0 0 22.279599
addressable-setters (click) 258324 189852 20 582 0 0% 0 0 14.437054
addressable-to-s (click) 268385 224523 26 853 0 0% 0 0 20.57277
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.817588
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.19782
erubi (click) 248303 222012 6 134 0 0% 0 0 3.900717
etanni (click) 32494 34168 8 114 0 0% 0 0 3.507481
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.077304
fluentd (click) 487902 436153 7 116 0 0% 0 0 3.690608
gcbench (click) 15808 8981 9 110 0 0% 0 0 3.491581
graphql (click) 409692 365456 73 1909 19 0% 0 0 53.546718
graphql-native (click) 354375 291188 39 532 0 0% 0 0 14.108668
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.736073
lee (click) 309338 275706 49 1099 0 0% 0 0 31.220782
matmul (click) 11103 4709 8 136 0 0% 0 0 4.220382
nbody (click) 14448 21176 6 251 0 0% 0 0 6.239955
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.415496
optcarrot (click) 319416 277986 188 4589 34 0% 0 0 108.203629
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 73.580245
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 47.469779
rack (click) 274946 265626 35 581 0 0% 0 0 15.074994
ruby-json (click) 19917 18004 8 206 0 0% 0 0 5.751602
rubyboy (click) 704837 655337 154 6871 42 0% 0 0 167.337214
rubykon (click) 148777 155950 138 2107 4 0% 0 0 57.207617
splay (click) 34953 22682 9 175 0 0% 0 0 5.316878
sudoku (click) 51776 65830 7 871 0 0% 0 0 23.135027
tinygql (click) 300959 246951 59 1031 5 0% 0 0 27.03103
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1950.888371
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 491.239487
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.091412
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.539024
fib (click) 2659 2995 3 30 0 0% 0 0 1.109271
getivar (click) 3789 6778 3 79 0 0% 0 0 1.979435
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.350548
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.854582
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.978068
object-new (click) 2406 2818 2 36 0 0% 0 0 1.075361
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.314991
object-new-no-escape (click) 4540 5102 5 68 0 0% 0 0 1.997979
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.179677
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.839302
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.803655
send_cfunc_block (click) 13777 10257 5 192 0 0% 0 0 3.813002
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.443313
setivar (click) 2783 3726 3 46 0 0% 0 0 1.282558
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.42762
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.771601
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.481
structaref (click) 4407 9095 3 88 0 0% 0 0 2.370612
structaset (click) 4113 5834 3 70 0 0% 0 0 1.829487
throw (click) 5953 4624 5 53 0 0% 0 0 1.816711

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.