Ruby Benchmarks

Details for Benchmarks at 2026-03-27 00:57:49 UTC

YJIT metrics from the ruby-bench suite using Ruby 2ebcc3abdf.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 95.4% faster than CRuby 4.1.0dev
  • 6.5% faster than YJIT 3.4.7
On railsbench it is
  • 123.6% faster than CRuby 4.1.0dev
  • 13.6% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 41 minutes
aarch64 runtime: 7 hours, 30 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 92 5 97 50 200 50 241
chunky-png 5 32 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 424 5 433 50 618 50 650
liquid-compile 5 421 5 470 50 581 50 728
liquid-render 5 172 5 175 50 435 50 451
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 198 50 253 50 264
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 155 5 158 50 246 50 254
ruby-lsp 5 156 5 160 50 239 50 232
sequel 5 429 5 433 50 579 50 602
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 27 50 12 50 12
addressable-getters 5 164 5 171 50 182 50 203
addressable-join 5 74 5 79 50 65 50 76
addressable-merge 5 161 5 159 50 222 50 224
addressable-new 5 350 5 356 50 522 50 538
addressable-normalize 5 53 5 55 50 60 50 61
addressable-parse 5 103 5 105 50 104 50 111
addressable-setters 5 185 5 188 50 234 50 238
addressable-to-s 5 164 5 173 50 182 50 196
binarytrees 5 82 5 89 50 136 50 158
blurhash 5 84 5 87 50 145 50 145
erubi 5 129 5 157 50 139 50 150
etanni 5 100 5 75 50 72 50 40
fannkuchredux 5 55 5 57 50 100 50 105
fluentd 5 58 5 63 50 21 50 34
gcbench 5 10 5 10 50 10 50 10
graphql 5 371 5 462 50 562 50 945
graphql-native 5 59 5 88 50 22 50 70
knucleotide 5 164 5 160 50 117 50 114
lee 5 23 5 30 50 10 50 11
matmul 5 53 5 54 50 87 50 97
nbody 5 250 5 287 50 662 50 703
nqueens 5 119 5 125 50 554 50 593
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 182 50 697 50 811
protoboeuf-encode 5 201 5 206 50 795 50 815
rack 5 444 5 451 50 718 50 723
ruby-json 5 83 5 101 50 50 50 74
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 209 5 235 50 247 50 290
sudoku 5 48 5 49 50 155 50 167
tinygql 5 40 5 43 50 40 50 52
30k_ifelse 5 28 5 28 50 186 50 184
30k_methods 5 38 5 41 50 455 50 457
attr_accessor 5 157 5 175 50 1831 50 1881
cfunc_itself 5 348 5 336 50 1255 50 1259
fib 5 125 5 146 50 939 50 939
getivar 5 210 5 316 50 2306 50 2428
getivar-module 5 103 5 137 50 89 50 249
keyword_args 5 103 5 110 50 1240 50 1243
loops-times 5 23 5 26 50 63 50 62
object-new 5 268 5 417 50 296 50 977
object-new-initialize 5 168 5 243 50 259 50 770
object-new-no-escape 5 81 5 131 50 89 50 378
respond_to 5 139 5 135 50 3905 50 3897
ruby-xor 5 247 5 252 50 1305 50 1297
send_bmethod 5 118 5 124 50 5539 50 4527
send_cfunc_block 5 106 5 99 50 354 50 381
send_rubyfunc_block 5 245 5 252 50 6920 50 6910
setivar 5 359 5 483 50 4931 50 5046
setivar_object 5 341 5 303 50 766 50 586
setivar_young 5 341 5 306 50 810 50 616
str_concat 5 390 5 459 50 1201 50 1190
structaref 5 153 5 188 50 1798 50 1874
structaset 5 197 5 267 50 370 50 489
throw 5 1107 5 1452 50 1440 50 1842

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) 1558398 1404397 203 2667 0 0% 0 0 78.936373
chunky-png (click) 306871 293183 79 1376 1 0% 0 0 38.383643
erubi-rails (click) 1380522 1250259 268 3677 22 0% 0 0 96.214779
hexapdf (click) 1511611 1294479 593 15711 44 0% 0 0 427.379335
liquid-c (click) 560277 456117 114 2236 5 0% 0 0 58.248976
liquid-compile (click) 475936 424123 146 2741 2 0% 0 0 78.693648
liquid-render (click) 664948 568705 131 2959 8 0% 0 0 77.403798
lobsters (click) 8697569 7138575 3128 64320 120 0% 0 0 2071.192982
mail (click) 871552 829248 345 7728 40 0% 0 0 208.410938
psych-load (click) 282295 256638 61 831 2 0% 0 0 23.388898
railsbench (click) 3359238 2917252 1592 19808 97 0% 0 0 539.009755
rubocop (click) 5779770 5027025 3002 57104 126 0% 6 0 1724.610791
ruby-lsp (click) 1046026 842093 409 7462 47 0% 1 0 199.939017
sequel (click) 499831 447572 11 119 0 0% 0 0 3.94949
shipit (click) 6881335 5760335 3136 50258 142 0% 0 0 1638.892914
addressable-equality (click) 318908 277663 44 1380 1 0% 0 0 33.439047
addressable-getters (click) 281561 239518 26 863 0 0% 0 0 20.518821
addressable-join (click) 291515 229123 24 1005 0 0% 0 0 25.00031
addressable-merge (click) 285085 232155 27 898 0 0% 0 0 21.778012
addressable-new (click) 261958 215520 21 565 0 0% 0 0 13.972435
addressable-normalize (click) 315068 240925 43 1343 1 0% 0 0 32.018567
addressable-parse (click) 280455 228599 26 880 0 0% 0 0 21.198261
addressable-setters (click) 259000 221865 20 582 0 0% 0 0 14.165695
addressable-to-s (click) 262205 199347 26 849 0 0% 0 0 20.101771
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.805088
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.735151
erubi (click) 251493 216379 6 134 0 0% 0 0 3.792852
etanni (click) 32731 34499 8 114 0 0% 0 0 3.39348
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.830872
fluentd (click) 491704 374034 7 116 0 0% 0 0 3.682567
gcbench (click) 15808 8981 9 110 0 0% 0 0 3.394109
graphql (click) 409807 380617 73 1909 19 0% 0 0 52.114189
graphql-native (click) 358098 327162 39 532 0 0% 0 0 13.648187
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.688357
lee (click) 319463 286795 49 1099 0 0% 0 0 30.812092
matmul (click) 11103 4709 8 136 0 0% 0 0 4.158902
nbody (click) 14448 21176 6 251 0 0% 0 0 6.161192
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.190516
optcarrot (click) 319416 277986 188 4589 34 0% 0 0 106.094231
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.435129
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 43.154583
rack (click) 291985 276256 35 625 0 0% 0 0 16.011452
ruby-json (click) 19699 17751 8 206 0 0% 0 0 5.760364
rubyboy (click) 707076 632128 154 6877 42 0% 0 0 165.225362
rubykon (click) 148683 164130 138 2104 4 0% 0 0 55.195985
splay (click) 34953 22682 9 175 0 0% 0 0 5.235564
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.712602
tinygql (click) 306005 284191 59 1031 5 0% 0 0 26.651469
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1875.392938
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 473.563584
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.10715
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.52217
fib (click) 2659 2995 3 30 0 0% 0 0 1.091296
getivar (click) 3789 6778 3 79 0 0% 0 0 1.923536
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.318152
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.791676
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.851705
object-new (click) 2406 2818 2 36 0 0% 0 0 1.084482
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.267984
object-new-no-escape (click) 4540 5102 5 68 0 0% 0 0 1.95698
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.108737
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.834074
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.832234
send_cfunc_block (click) 13777 10257 5 192 0 0% 0 0 3.810072
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.459769
setivar (click) 2783 3726 3 46 0 0% 0 0 1.259537
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.433721
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.732974
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.382747
structaref (click) 4407 9095 3 88 0 0% 0 0 2.35614
structaset (click) 4113 5834 3 70 0 0% 0 0 1.818805
throw (click) 5953 4624 5 53 0 0% 0 0 1.772798

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.