Ruby Benchmarks

Details for Benchmarks at 2026-02-20 00:50:07 UTC

YJIT metrics from the ruby-bench suite using Ruby 06c8b1abfa.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 94.5% faster than CRuby 4.1.0dev
  • 6.2% faster than YJIT 3.4.7
On railsbench it is
  • 112.7% faster than CRuby 4.1.0dev
  • 12.5% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 24 minutes
aarch64 runtime: 7 hours, 18 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 98 50 200 50 243
chunky-png 5 31 5 33 50 32 50 28
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 420 5 430 50 624 50 633
liquid-compile 5 415 5 480 50 581 50 734
liquid-render 5 172 5 176 50 434 50 450
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 196 50 252 50 264
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 160 50 247 50 253
ruby-lsp 5 155 5 163 50 231 50 233
sequel 5 426 5 434 50 597 50 609
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 28 50 11 50 14
addressable-getters 5 165 5 174 50 183 50 202
addressable-join 5 73 5 81 50 65 50 77
addressable-merge 5 160 5 161 50 222 50 231
addressable-new 5 353 5 352 50 524 50 546
addressable-normalize 5 53 5 56 50 59 50 63
addressable-parse 5 103 5 108 50 104 50 114
addressable-setters 5 184 5 189 50 229 50 244
addressable-to-s 5 164 5 171 50 182 50 201
binarytrees 5 82 5 87 50 136 50 148
blurhash 5 83 5 86 50 143 50 144
erubi 5 134 5 146 50 128 50 146
etanni 5 99 5 71 50 71 50 40
fannkuchredux 5 55 5 57 50 102 50 104
fluentd 5 56 5 60 50 20 50 30
graphql 5 370 5 470 50 573 50 934
graphql-native 5 58 5 86 50 23 50 68
knucleotide 5 164 5 157 50 117 50 110
lee 5 23 5 23 50 10 50 10
matmul 5 51 5 56 50 94 50 94
nbody 5 246 5 294 50 677 50 703
nqueens 5 116 5 126 50 556 50 578
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 183 50 707 50 766
protoboeuf-encode 5 193 5 193 50 836 50 798
rack 5 440 5 455 50 712 50 721
ruby-json 5 84 5 99 50 46 50 73
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
sudoku 5 48 5 48 50 156 50 157
tinygql 5 39 5 44 50 40 50 49
30k_ifelse 5 28 5 28 50 184 50 183
30k_methods 5 38 5 40 50 455 50 455
attr_accessor 5 158 5 196 50 1834 50 1920
cfunc_itself 5 349 5 337 50 1255 50 1259
fib 5 124 5 138 50 939 50 939
getivar 5 218 5 337 50 2312 50 2437
getivar-module 5 104 5 145 50 90 50 272
keyword_args 5 100 5 101 50 1236 50 1242
loops-times 5 23 5 26 50 64 50 62
object-new 5 268 5 409 50 295 50 901
respond_to 5 139 5 140 50 3887 50 3901
ruby-xor 5 236 5 250 50 1313 50 1300
send_bmethod 5 117 5 125 50 5539 50 4527
send_cfunc_block 5 106 5 105 50 352 50 369
send_rubyfunc_block 5 251 5 245 50 6926 50 6930
setivar 5 359 5 481 50 4923 50 5044
setivar_object 5 341 5 304 50 747 50 634
setivar_young 5 341 5 307 50 797 50 660
str_concat 5 390 5 446 50 1202 50 1180
structaref 5 156 5 196 50 1812 50 1889
structaset 5 202 5 252 50 397 50 497
throw 5 1083 5 1448 50 1407 50 1878

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) 1550961 1365242 203 2646 0 0% 0 0 75.43763
chunky-png (click) 321334 279547 79 1376 1 0% 0 0 39.243336
erubi-rails (click) 1374869 1114148 268 3647 22 0% 0 0 97.696058
hexapdf (click) 1525930 1280759 593 15710 44 0% 0 0 437.582948
liquid-c (click) 559291 472836 114 2236 5 0% 0 0 60.474954
liquid-compile (click) 467533 408194 146 2695 2 0% 0 0 78.561289
liquid-render (click) 665510 588169 131 2959 8 0% 0 0 79.769622
lobsters (click) 8716342 7313875 3124 64301 120 0% 0 0 2130.679942
mail (click) 871790 830765 345 7728 40 0% 0 0 215.099599
psych-load (click) 290106 265684 61 831 2 0% 0 0 24.177457
railsbench (click) 3364073 2807541 1592 19868 97 0% 0 0 557.408318
rubocop (click) 5783520 5008088 3002 57145 125 0% 6 0 1673.338166
ruby-lsp (click) 1044626 954878 409 7472 47 0% 1 0 204.502346
sequel (click) 497033 449755 11 119 0 0% 0 0 3.98954
shipit (click) 7139005 5994616 3299 52247 168 0% 0 0 1735.583459
addressable-equality (click) 317387 252349 44 1380 1 0% 0 0 34.997354
addressable-getters (click) 277719 236271 26 863 0 0% 0 0 20.917995
addressable-join (click) 287537 242097 24 1005 0 0% 0 0 25.272194
addressable-merge (click) 270032 257207 27 898 0 0% 0 0 22.853852
addressable-new (click) 259327 197370 21 591 0 0% 0 0 14.724788
addressable-normalize (click) 312859 272054 43 1329 1 0% 0 0 32.982154
addressable-parse (click) 280597 230165 26 882 0 0% 0 0 22.02658
addressable-setters (click) 258150 238919 20 582 0 0% 0 0 14.540556
addressable-to-s (click) 276658 259318 26 849 0 0% 0 0 20.693948
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.821478
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.32336
erubi (click) 248343 230801 6 134 0 0% 0 0 3.89958
etanni (click) 33355 27108 8 114 0 0% 0 0 3.453283
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.175236
fluentd (click) 488622 436831 7 116 0 0% 0 0 3.761376
graphql (click) 411743 343554 73 1909 19 0% 0 0 53.766969
graphql-native (click) 341381 309787 39 532 0 0% 0 0 14.404862
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.960218
lee (click) 318016 245251 49 1099 0 0% 0 0 31.207579
matmul (click) 11103 4709 8 136 0 0% 0 0 4.209813
nbody (click) 14448 21176 6 251 0 0% 0 0 6.162313
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.375042
optcarrot (click) 319416 277986 188 4589 34 0% 0 0 108.390679
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 73.139585
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 44.609943
rack (click) 286503 255875 35 628 0 0% 0 0 16.398786
ruby-json (click) 20323 18532 8 206 0 0% 0 0 5.688103
rubyboy (click) 705097 622729 154 6871 42 0% 0 0 167.406188
rubykon (click) 150715 174889 138 2130 4 0% 0 0 57.748813
sudoku (click) 51776 65830 7 871 0 0% 0 0 23.231695
tinygql (click) 301061 288073 59 1031 5 0% 0 0 27.52331
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1959.617332
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 494.79999
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.070082
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.499058
fib (click) 2659 2995 3 30 0 0% 0 0 1.13817
getivar (click) 3789 6778 3 79 0 0% 0 0 1.923821
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.335478
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.795481
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.94893
object-new (click) 2406 2818 2 36 0 0% 0 0 1.022152
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.145975
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.813827
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.806884
send_cfunc_block (click) 13777 10257 5 192 0 0% 0 0 3.767774
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.474377
setivar (click) 2783 3726 3 46 0 0% 0 0 1.294443
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.438071
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.713556
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.414634
structaref (click) 4407 9095 3 88 0 0% 0 0 2.318884
structaset (click) 4113 5834 3 70 0 0% 0 0 1.814826
throw (click) 5953 4624 5 53 0 0% 0 0 1.748511

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.