Ruby Benchmarks

Details for Benchmarks at 2026-03-17 00:51:40 UTC

YJIT metrics from the ruby-bench suite using Ruby 3092f4fed4.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 93.9% faster than CRuby 4.1.0dev
  • 6.6% faster than YJIT 3.4.7
On railsbench it is
  • 111.7% faster than CRuby 4.1.0dev
  • 13.5% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 4 minutes
aarch64 runtime: 7 hours, 51 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 99 50 198 50 241
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 419 5 430 50 625 50 655
liquid-compile 5 419 5 486 50 584 50 716
liquid-render 5 169 5 173 50 412 50 451
lobsters 5 19 5 20 50 10 50 10
mail 5 194 5 196 50 252 50 268
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 257
ruby-lsp 5 155 5 162 50 226 50 234
sequel 5 426 5 439 50 597 50 605
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 28 50 11 50 14
addressable-getters 5 164 5 172 50 183 50 201
addressable-join 5 73 5 81 50 65 50 75
addressable-merge 5 159 5 162 50 221 50 230
addressable-new 5 352 5 364 50 523 50 525
addressable-normalize 5 53 5 56 50 59 50 63
addressable-parse 5 103 5 107 50 104 50 115
addressable-setters 5 184 5 188 50 229 50 238
addressable-to-s 5 163 5 172 50 182 50 200
binarytrees 5 82 5 86 50 136 50 147
blurhash 5 83 5 87 50 143 50 145
erubi 5 136 5 152 50 136 50 155
etanni 5 98 5 74 50 71 50 42
fannkuchredux 5 55 5 57 50 102 50 103
fluentd 5 56 5 62 50 20 50 33
gcbench 5 10 5 10 50 10 50 10
graphql 5 371 5 467 50 571 50 915
graphql-native 5 59 5 88 50 22 50 72
knucleotide 5 164 5 158 50 117 50 111
lee 5 23 5 29 50 10 50 10
matmul 5 51 5 50 50 94 50 96
nbody 5 246 5 272 50 676 50 702
nqueens 5 116 5 128 50 557 50 580
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 185 50 706 50 788
protoboeuf-encode 5 197 5 204 50 833 50 792
rack 5 441 5 452 50 704 50 726
ruby-json 5 81 5 101 50 46 50 73
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 210 5 231 50 243 50 288
sudoku 5 48 5 49 50 157 50 158
tinygql 5 41 5 44 50 40 50 50
30k_ifelse 5 28 5 28 50 185 50 184
30k_methods 5 38 5 40 50 447 50 458
attr_accessor 5 157 5 195 50 1833 50 1917
cfunc_itself 5 349 5 372 50 1254 50 1258
fib 5 124 5 135 50 939 50 939
getivar 5 215 5 289 50 2315 50 2401
getivar-module 5 104 5 120 50 90 50 259
keyword_args 5 100 5 107 50 1240 50 1239
loops-times 5 23 5 24 50 64 50 62
object-new 5 268 5 411 50 298 50 915
object-new-initialize 5 168 5 239 50 257 50 761
object-new-no-escape 5 81 5 130 50 90 50 374
respond_to 5 139 5 138 50 3892 50 3895
ruby-xor 5 237 5 259 50 1312 50 1297
send_bmethod 5 117 5 125 50 5539 50 4526
send_cfunc_block 5 105 5 107 50 353 50 370
send_rubyfunc_block 5 250 5 251 50 6924 50 6920
setivar 5 359 5 450 50 4924 50 5022
setivar_object 5 341 5 291 50 750 50 537
setivar_young 5 341 5 294 50 796 50 554
str_concat 5 390 5 445 50 1199 50 1159
structaref 5 156 5 193 50 1810 50 1886
structaset 5 201 5 246 50 396 50 494
throw 5 1086 5 1455 50 1418 50 1896

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) 1553565 1301579 203 2657 0 0% 0 0 75.204841
chunky-png (click) 320838 278372 79 1376 1 0% 0 0 39.418363
erubi-rails (click) 1380152 1169448 268 3671 22 0% 0 0 98.393373
hexapdf (click) 1525015 1311815 593 15710 44 0% 0 0 438.328482
liquid-c (click) 557863 519339 114 2236 5 0% 0 0 59.875106
liquid-compile (click) 481721 398928 146 2744 2 0% 0 0 79.640496
liquid-render (click) 665034 544901 131 2959 8 0% 0 0 79.402237
lobsters (click) 8698990 7348457 3125 64258 120 0% 0 0 2110.644816
mail (click) 869938 812112 345 7728 40 0% 0 0 214.655403
psych-load (click) 287747 263882 61 831 2 0% 0 0 24.369898
railsbench (click) 3358536 2957635 1592 19760 97 0% 0 0 559.691532
rubocop (click) 5790029 4982403 3002 57207 125 0% 6 0 1697.044338
ruby-lsp (click) 1042007 960839 408 7446 46 0% 1 0 205.0688
sequel (click) 502719 429133 11 119 0 0% 0 0 3.992337
shipit (click) 7117323 6122577 3293 52950 146 0% 0 0 1773.31889
addressable-equality (click) 318008 293383 44 1405 1 0% 0 0 35.145214
addressable-getters (click) 275912 266581 26 863 0 0% 0 0 20.984099
addressable-join (click) 282404 259686 24 941 0 0% 0 0 23.8167
addressable-merge (click) 282142 270120 27 896 0 0% 0 0 21.833854
addressable-new (click) 251066 205676 21 563 0 0% 0 0 14.143666
addressable-normalize (click) 311827 237504 43 1327 1 0% 0 0 32.687006
addressable-parse (click) 279838 236818 26 880 0 0% 0 0 21.692807
addressable-setters (click) 257456 229260 20 582 0 0% 0 0 14.808919
addressable-to-s (click) 278599 252574 26 889 0 0% 0 0 21.671555
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.786272
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.271031
erubi (click) 247441 204110 6 134 0 0% 0 0 3.883456
etanni (click) 32494 34168 8 114 0 0% 0 0 3.479661
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.07225
fluentd (click) 487734 419303 7 116 0 0% 0 0 3.663644
gcbench (click) 15808 8981 9 110 0 0% 0 0 3.504432
graphql (click) 407915 371232 73 1909 19 0% 0 0 53.260941
graphql-native (click) 352383 280452 39 532 0 0% 0 0 13.939952
knucleotide (click) 9939 10477 7 110 0 0% 0 0 6.598324
lee (click) 316583 275856 49 1102 0 0% 0 0 31.319935
matmul (click) 11103 4709 8 136 0 0% 0 0 4.225616
nbody (click) 14448 21176 6 251 0 0% 0 0 6.296883
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.505871
optcarrot (click) 319416 277986 188 4589 34 0% 0 0 108.302469
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 73.871799
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 47.375434
rack (click) 285530 254166 35 628 0 0% 0 0 16.540793
ruby-json (click) 20044 18184 8 206 0 0% 0 0 5.780243
rubyboy (click) 687042 595411 154 6871 42 0% 0 0 169.001763
rubykon (click) 148777 155950 138 2107 4 0% 0 0 57.010917
splay (click) 34953 22682 9 175 0 0% 0 0 5.313939
sudoku (click) 51776 65830 7 871 0 0% 0 0 23.158213
tinygql (click) 300420 245690 59 1031 5 0% 0 0 27.676489
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1951.501291
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 491.264662
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.137245
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.518838
fib (click) 2659 2995 3 30 0 0% 0 0 1.125265
getivar (click) 3789 6778 3 79 0 0% 0 0 1.974624
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.388603
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.823972
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.949002
object-new (click) 2406 2818 2 36 0 0% 0 0 1.103168
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.317696
object-new-no-escape (click) 4540 5102 5 68 0 0% 0 0 2.023685
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.196162
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.805619
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.839761
send_cfunc_block (click) 13777 10257 5 192 0 0% 0 0 3.866779
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.495981
setivar (click) 2783 3726 3 46 0 0% 0 0 1.301484
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.446672
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.758602
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.434327
structaref (click) 4407 9095 3 88 0 0% 0 0 2.403683
structaset (click) 4113 5834 3 70 0 0% 0 0 1.815422
throw (click) 5953 4624 5 53 0 0% 0 0 1.808156

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.