Ruby Benchmarks

Details for Benchmarks at 2026-03-05 00:52:27 UTC

YJIT metrics from the ruby-bench suite using Ruby 6ea811e67c.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 94.7% faster than CRuby 4.1.0dev
  • 6.8% faster than YJIT 3.4.7
On railsbench it is
  • 111.9% faster than CRuby 4.1.0dev
  • 14.0% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 23 minutes
aarch64 runtime: 7 hours, 16 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 89 5 100 50 190 50 241
chunky-png 5 31 5 32 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 420 5 433 50 624 50 644
liquid-compile 5 418 5 481 50 582 50 721
liquid-render 5 171 5 176 50 432 50 452
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 194 50 253 50 275
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 246 50 252
ruby-lsp 5 160 5 163 50 230 50 234
sequel 5 420 5 436 50 586 50 617
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 183 50 201
addressable-join 5 73 5 80 50 66 50 76
addressable-merge 5 159 5 160 50 222 50 224
addressable-new 5 353 5 358 50 526 50 523
addressable-normalize 5 53 5 54 50 59 50 63
addressable-parse 5 104 5 107 50 104 50 113
addressable-setters 5 183 5 188 50 231 50 236
addressable-to-s 5 163 5 172 50 181 50 205
binarytrees 5 81 5 87 50 135 50 148
blurhash 5 83 5 86 50 143 50 145
erubi 5 136 5 151 50 138 50 158
etanni 5 98 5 72 50 71 50 40
fannkuchredux 5 55 5 50 50 101 50 89
fluentd 5 56 5 63 50 20 50 27
graphql 5 369 5 475 50 575 50 925
graphql-native 5 58 5 89 50 22 50 68
knucleotide 5 163 5 156 50 118 50 110
lee 5 23 5 24 50 10 50 10
matmul 5 51 5 50 50 94 50 96
nbody 5 246 5 269 50 674 50 700
nqueens 5 116 5 125 50 557 50 578
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 178 50 704 50 768
protoboeuf-encode 5 197 5 203 50 840 50 833
rack 5 440 5 453 50 714 50 723
ruby-json 5 82 5 105 50 50 50 75
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
sudoku 5 48 5 49 50 156 50 157
tinygql 5 40 5 44 50 39 50 51
30k_ifelse 5 28 5 28 50 184 50 182
30k_methods 5 38 5 40 50 450 50 455
attr_accessor 5 157 5 191 50 1835 50 1905
cfunc_itself 5 348 5 330 50 1252 50 1258
fib 5 124 5 143 50 937 50 936
getivar 5 217 5 291 50 2309 50 2392
getivar-module 5 103 5 122 50 90 50 258
keyword_args 5 100 5 111 50 1239 50 1242
loops-times 5 23 5 24 50 63 50 60
object-new 5 267 5 419 50 295 50 929
respond_to 5 139 5 137 50 3892 50 3891
ruby-xor 5 236 5 235 50 1314 50 1294
send_bmethod 5 117 5 123 50 5539 50 4526
send_cfunc_block 5 107 5 106 50 352 50 384
send_rubyfunc_block 5 250 5 243 50 6925 50 6921
setivar 5 359 5 440 50 4919 50 5000
setivar_object 5 341 5 305 50 750 50 635
setivar_young 5 341 5 308 50 797 50 650
str_concat 5 388 5 453 50 1200 50 1208
structaref 5 156 5 194 50 1806 50 1879
structaset 5 203 5 260 50 398 50 501
throw 5 1089 5 1362 50 1410 50 1832

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) 1552552 1333288 203 2646 0 0% 0 0 74.629559
chunky-png (click) 321334 271355 79 1376 1 0% 0 0 39.083669
erubi-rails (click) 1383504 1213106 268 3716 22 0% 0 0 99.386229
hexapdf (click) 1524928 1255381 593 15706 44 0% 0 0 439.048446
liquid-c (click) 559375 497499 114 2236 5 0% 0 0 59.428257
liquid-compile (click) 481553 441021 146 2727 2 0% 0 0 78.440594
liquid-render (click) 665913 579930 131 2959 8 0% 0 0 79.165055
lobsters (click) 8695726 7448361 3124 64111 120 0% 0 0 2212.8295
mail (click) 871396 830350 345 7728 40 0% 0 0 213.457509
psych-load (click) 288107 256994 61 831 2 0% 0 0 24.062738
railsbench (click) 3355697 2905681 1592 19776 97 0% 0 0 556.220144
rubocop (click) 5782619 4998645 3002 57123 126 0% 6 0 1661.943013
ruby-lsp (click) 1042417 880311 408 7446 46 0% 1 0 205.977305
sequel (click) 503021 422048 11 119 0 0% 0 0 3.922339
shipit (click) 7483566 6226478 3438 55787 173 0% 1 0 1829.743168
addressable-equality (click) 319670 279875 44 1424 1 0% 0 0 35.598768
addressable-getters (click) 277719 236271 26 863 0 0% 0 0 20.765756
addressable-join (click) 281022 251319 24 941 0 0% 0 0 23.467951
addressable-merge (click) 283028 230819 27 896 0 0% 0 0 22.26592
addressable-new (click) 259327 197370 21 591 0 0% 0 0 14.810435
addressable-normalize (click) 310373 253407 43 1327 1 0% 0 0 32.399248
addressable-parse (click) 280436 229954 26 880 0 0% 0 0 21.604558
addressable-setters (click) 257481 230204 20 582 0 0% 0 0 14.580702
addressable-to-s (click) 276937 234790 26 849 0 0% 0 0 20.517964
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.855977
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.236236
erubi (click) 248439 239112 6 134 0 0% 0 0 3.871178
etanni (click) 32900 34696 8 114 0 0% 0 0 3.46411
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.037738
fluentd (click) 487528 468640 7 116 0 0% 0 0 3.793806
graphql (click) 409820 366262 73 1909 19 0% 0 0 53.412905
graphql-native (click) 354293 300118 39 532 0 0% 0 0 14.318384
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.979209
lee (click) 319458 246749 49 1099 0 0% 0 0 31.592307
matmul (click) 11103 4709 8 136 0 0% 0 0 4.245932
nbody (click) 14448 21176 6 251 0 0% 0 0 6.134537
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.348073
optcarrot (click) 319416 277986 188 4589 34 0% 0 0 109.008397
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 73.209012
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 44.462494
rack (click) 288318 266208 35 656 0 0% 0 0 17.252322
ruby-json (click) 19868 17928 8 206 0 0% 0 0 5.664605
rubyboy (click) 705242 622902 154 6875 42 0% 0 0 168.292074
rubykon (click) 149667 148880 138 2117 4 0% 0 0 57.228314
sudoku (click) 51776 65830 7 871 0 0% 0 0 23.107793
tinygql (click) 301108 288112 59 1031 5 0% 0 0 27.425415
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1949.063094
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 492.604982
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.095167
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.512937
fib (click) 2659 2995 3 30 0 0% 0 0 1.089913
getivar (click) 3789 6778 3 79 0 0% 0 0 1.881969
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.326148
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.832736
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.984492
object-new (click) 2406 2818 2 36 0 0% 0 0 1.053953
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.12163
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.813804
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.802295
send_cfunc_block (click) 13777 10257 5 192 0 0% 0 0 3.800487
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.448012
setivar (click) 2783 3726 3 46 0 0% 0 0 1.263284
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.384498
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.714973
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.610951
structaref (click) 4407 9095 3 88 0 0% 0 0 2.326485
structaset (click) 4113 5834 3 70 0 0% 0 0 1.757672
throw (click) 5953 4624 5 53 0 0% 0 0 1.766186

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.