Ruby Benchmarks

Details for Benchmarks at 2026-03-22 00:55:43 UTC

YJIT metrics from the ruby-bench suite using Ruby 251fd7a11e.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 94.7% faster than CRuby 4.1.0dev
  • 7.9% faster than YJIT 3.4.7
On railsbench it is
  • 112.6% faster than CRuby 4.1.0dev
  • 12.3% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 5 minutes
aarch64 runtime: 7 hours, 54 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 97 50 203 50 245
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 419 5 437 50 623 50 653
liquid-compile 5 419 5 486 50 582 50 731
liquid-render 5 171 5 175 50 436 50 450
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 203 50 253 50 288
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 161 50 245 50 254
ruby-lsp 5 159 5 162 50 221 50 235
sequel 5 428 5 439 50 596 50 612
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 28 50 11 50 13
addressable-getters 5 163 5 173 50 184 50 200
addressable-join 5 73 5 78 50 66 50 75
addressable-merge 5 159 5 160 50 221 50 227
addressable-new 5 355 5 357 50 525 50 532
addressable-normalize 5 54 5 56 50 59 50 63
addressable-parse 5 103 5 107 50 103 50 113
addressable-setters 5 185 5 189 50 229 50 240
addressable-to-s 5 163 5 171 50 183 50 201
binarytrees 5 82 5 88 50 136 50 157
blurhash 5 83 5 86 50 143 50 145
erubi 5 137 5 155 50 126 50 159
etanni 5 97 5 76 50 72 50 41
fannkuchredux 5 55 5 57 50 102 50 104
fluentd 5 62 5 66 50 19 50 29
gcbench 5 10 5 10 50 10 50 10
graphql 5 372 5 455 50 573 50 948
graphql-native 5 57 5 88 50 22 50 70
knucleotide 5 163 5 160 50 117 50 114
lee 5 23 5 30 50 10 50 10
matmul 5 51 5 54 50 94 50 96
nbody 5 246 5 247 50 676 50 663
nqueens 5 116 5 129 50 556 50 579
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 177 5 184 50 706 50 806
protoboeuf-encode 5 197 5 204 50 828 50 810
rack 5 436 5 458 50 706 50 728
ruby-json 5 82 5 103 50 46 50 77
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 23 50 10 50 10
splay 5 210 5 233 50 243 50 288
sudoku 5 48 5 49 50 157 50 156
tinygql 5 41 5 43 50 40 50 50
30k_ifelse 5 28 5 28 50 185 50 184
30k_methods 5 38 5 41 50 455 50 454
attr_accessor 5 157 5 182 50 1836 50 1894
cfunc_itself 5 349 5 354 50 1255 50 1259
fib 5 124 5 143 50 939 50 939
getivar 5 217 5 321 50 2316 50 2426
getivar-module 5 104 5 140 50 90 50 269
keyword_args 5 100 5 97 50 1240 50 1242
loops-times 5 23 5 27 50 64 50 57
object-new 5 268 5 406 50 297 50 900
object-new-initialize 5 169 5 247 50 258 50 774
object-new-no-escape 5 81 5 130 50 89 50 366
respond_to 5 139 5 140 50 3888 50 3901
ruby-xor 5 237 5 247 50 1311 50 1300
send_bmethod 5 116 5 121 50 5539 50 4527
send_cfunc_block 5 106 5 105 50 353 50 384
send_rubyfunc_block 5 250 5 256 50 6923 50 6928
setivar 5 359 5 486 50 4922 50 5047
setivar_object 5 341 5 304 50 751 50 628
setivar_young 5 341 5 306 50 799 50 658
str_concat 5 389 5 461 50 1199 50 1180
structaref 5 156 5 182 50 1813 50 1871
structaset 5 201 5 251 50 397 50 487
throw 5 1088 5 1440 50 1412 50 1899

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) 1544637 1305193 203 2657 0 0% 0 0 75.552979
chunky-png (click) 315880 281822 79 1376 1 0% 0 0 39.099816
erubi-rails (click) 1380977 1209394 268 3712 22 0% 0 0 100.577698
hexapdf (click) 1526417 1337463 594 15719 44 0% 0 0 442.894541
liquid-c (click) 560427 530326 114 2236 5 0% 0 0 59.807356
liquid-compile (click) 482871 416050 146 2750 2 0% 0 0 80.363327
liquid-render (click) 667256 588293 131 2959 8 0% 0 0 80.208625
lobsters (click) 8699916 7375214 3127 64180 120 0% 0 0 2119.86408
mail (click) 871457 837318 345 7728 40 0% 0 0 217.120114
psych-load (click) 290348 266680 61 831 2 0% 0 0 23.947434
railsbench (click) 3357103 2921861 1592 19750 97 0% 0 0 554.79515
rubocop (click) 5782018 5110938 3003 57106 126 0% 6 0 1673.811005
ruby-lsp (click) 1041673 960090 409 7464 47 0% 1 0 207.278292
sequel (click) 503934 405734 11 119 0 0% 0 0 3.871747
shipit (click) 6929236 5861088 3135 50730 143 0% 0 0 1658.261678
addressable-equality (click) 317685 259406 44 1389 1 0% 0 0 35.109315
addressable-getters (click) 274026 232062 26 863 0 0% 0 0 20.999835
addressable-join (click) 282685 243181 24 941 0 0% 0 0 23.575328
addressable-merge (click) 284740 231958 27 896 0 0% 0 0 22.312627
addressable-new (click) 257547 226863 21 563 0 0% 0 0 13.944881
addressable-normalize (click) 315115 263619 43 1336 1 0% 0 0 33.146603
addressable-parse (click) 279882 219768 26 880 0 0% 0 0 21.705027
addressable-setters (click) 259700 174365 20 582 0 0% 0 0 15.060165
addressable-to-s (click) 277142 233570 26 853 0 0% 0 0 20.862899
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.820662
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.198706
erubi (click) 247921 220570 6 134 0 0% 0 0 3.994882
etanni (click) 32731 34499 8 114 0 0% 0 0 3.512036
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.136388
fluentd (click) 490228 420526 7 116 0 0% 0 0 3.723384
gcbench (click) 15808 8981 9 110 0 0% 0 0 3.453048
graphql (click) 409717 339549 73 1909 19 0% 0 0 54.082537
graphql-native (click) 354321 281983 39 532 0 0% 0 0 13.898398
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.875979
lee (click) 313697 273325 49 1102 0 0% 0 0 31.42507
matmul (click) 11103 4709 8 136 0 0% 0 0 4.227813
nbody (click) 14448 21176 6 251 0 0% 0 0 6.306532
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.451814
optcarrot (click) 319416 277986 188 4589 34 0% 0 0 109.344863
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 73.705015
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 44.552142
rack (click) 285583 269269 35 581 0 0% 0 0 15.184389
ruby-json (click) 19462 17420 8 206 0 0% 0 0 5.911891
rubyboy (click) 704914 580258 154 6873 42 0% 0 0 169.115945
rubykon (click) 149667 148880 138 2117 4 0% 0 0 57.044349
splay (click) 34953 22682 9 175 0 0% 0 0 5.355807
sudoku (click) 51776 65830 7 871 0 0% 0 0 23.182193
tinygql (click) 300026 269241 59 1025 5 0% 0 0 27.128108
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1975.369018
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 494.750494
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.145249
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.521192
fib (click) 2659 2995 3 30 0 0% 0 0 1.125227
getivar (click) 3789 6778 3 79 0 0% 0 0 1.968408
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.39632
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.864004
loops-times (click) 7093 8387 5 100 0 0% 0 0 3.021174
object-new (click) 2406 2818 2 36 0 0% 0 0 1.066145
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.293437
object-new-no-escape (click) 4540 5102 5 68 0 0% 0 0 2.013759
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.174368
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.879688
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.810037
send_cfunc_block (click) 13777 10257 5 192 0 0% 0 0 3.876261
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.513862
setivar (click) 2783 3726 3 46 0 0% 0 0 1.287072
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.437174
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.720269
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.443245
structaref (click) 4407 9095 3 88 0 0% 0 0 2.398033
structaset (click) 4113 5834 3 70 0 0% 0 0 1.819252
throw (click) 5953 4624 5 53 0 0% 0 0 1.832831

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.