Ruby Benchmarks

Details for Benchmarks at 2026-01-08 00:43:19 UTC

YJIT metrics from the ruby-bench suite using Ruby 080d66beca.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 98.8% faster than CRuby 4.1.0dev
  • 5.2% faster than YJIT 3.4.7
On railsbench it is
  • 113.1% faster than CRuby 4.1.0dev
  • 11.1% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 6 minutes
aarch64 runtime: 7 hours, 3 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 190 50 232
chunky-png 5 31 5 33 50 33 50 29
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 420 5 426 50 626 50 637
liquid-compile 5 418 5 476 50 581 50 719
liquid-render 5 171 5 174 50 435 50 438
mail 5 195 5 189 50 253 50 263
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 155 5 159 50 248 50 255
ruby-lsp 5 146 5 149 50 253 50 253
sequel 5 428 5 427 50 596 50 584
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 26 50 11 50 11
addressable-getters 5 164 5 166 50 184 50 197
addressable-join 5 73 5 77 50 66 50 70
addressable-merge 5 158 5 156 50 221 50 218
addressable-new 5 352 5 343 50 522 50 505
addressable-normalize 5 53 5 53 50 59 50 58
addressable-parse 5 103 5 104 50 104 50 107
addressable-setters 5 184 5 180 50 230 50 225
addressable-to-s 5 164 5 169 50 183 50 196
binarytrees 5 82 5 82 50 136 50 126
blurhash 5 83 5 87 50 143 50 145
erubi 5 140 5 147 50 139 50 153
etanni 5 99 5 71 50 71 50 35
fannkuchredux 5 54 5 57 50 102 50 106
fluentd 5 56 5 61 50 20 50 22
graphql 5 372 5 469 50 571 50 958
graphql-native 5 57 5 87 50 23 50 65
knucleotide 5 163 5 158 50 118 50 112
lee 5 23 5 24 50 10 50 10
matmul 5 51 5 53 50 94 50 96
nbody 5 247 5 277 50 677 50 664
nqueens 5 116 5 129 50 556 50 593
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 173 5 184 50 707 50 773
protoboeuf-encode 5 197 5 202 50 832 50 814
rack 5 436 5 451 50 704 50 695
ruby-json 5 84 5 98 50 46 50 71
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
sudoku 5 48 5 49 50 157 50 164
tinygql 5 40 5 42 50 39 50 49
30k_ifelse 5 28 5 28 50 185 50 185
30k_methods 5 38 5 41 50 450 50 456
attr_accessor 5 157 5 204 50 1836 50 1928
cfunc_itself 5 348 5 343 50 1254 50 1259
fib 5 124 5 141 50 938 50 939
getivar 5 217 5 331 50 2316 50 2434
getivar-module 5 104 5 141 50 89 50 270
keyword_args 5 100 5 107 50 1239 50 1243
loops-times 5 23 5 26 50 63 50 57
object-new 5 268 5 367 50 299 50 686
respond_to 5 139 5 140 50 3888 50 3906
ruby-xor 5 236 5 248 50 1315 50 1285
send_bmethod 5 116 5 122 50 5539 50 4528
send_cfunc_block 5 106 5 107 50 353 50 329
send_rubyfunc_block 5 251 5 243 50 6920 50 6924
setivar 5 360 5 468 50 4925 50 5036
setivar_object 5 341 5 302 50 754 50 639
setivar_young 5 341 5 305 50 798 50 657
str_concat 5 390 5 455 50 1199 50 1186
structaref 5 156 5 196 50 1812 50 1887
structaset 5 201 5 252 50 394 50 514
throw 5 1092 5 1275 50 1415 50 1556

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) 1546110 1265284 203 2653 0 0% 0 0 75.637307
chunky-png (click) 320436 320324 79 1373 1 0% 0 0 38.729104
erubi-rails (click) 1360542 1169674 268 3624 22 0% 0 0 97.959843
hexapdf (click) 1522484 1379035 593 15677 44 0% 0 0 439.279028
liquid-c (click) 556983 512907 114 2228 5 0% 0 0 59.977187
liquid-compile (click) 476783 396278 146 2683 2 0% 0 0 76.979927
liquid-render (click) 663282 554552 131 2946 8 0% 0 0 79.731182
mail (click) 868114 838103 345 7721 40 0% 0 0 213.608862
psych-load (click) 287295 273305 61 825 2 0% 0 0 23.891265
railsbench (click) 3349466 2959514 1591 19778 97 0% 0 0 554.561864
rubocop (click) 5755936 5082975 3002 56845 125 0% 6 0 1669.801664
ruby-lsp (click) 959786 831836 343 6729 45 0% 1 0 181.372832
sequel (click) 502316 430788 11 119 0 0% 0 0 4.104514
shipit (click) 7436408 6177278 3438 55490 174 0% 1 0 1826.341961
addressable-equality (click) 316489 251977 44 1381 1 0% 0 0 34.233539
addressable-getters (click) 276797 202919 26 863 0 0% 0 0 21.081588
addressable-join (click) 269897 230244 24 953 0 0% 0 0 23.980191
addressable-merge (click) 281427 254217 27 896 0 0% 0 0 22.402375
addressable-new (click) 257194 211689 21 565 0 0% 0 0 14.277836
addressable-normalize (click) 315070 274814 43 1372 1 0% 0 0 33.925689
addressable-parse (click) 280566 238683 26 894 0 0% 0 0 22.117334
addressable-setters (click) 257228 197375 20 582 0 0% 0 0 14.805705
addressable-to-s (click) 276405 201873 26 849 0 0% 0 0 20.679132
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.772788
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.029404
erubi (click) 249272 208214 6 134 0 0% 0 0 3.893464
etanni (click) 33287 36246 8 113 0 0% 0 0 3.569903
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.041781
fluentd (click) 483658 416581 7 115 0 0% 0 0 3.766206
graphql (click) 410135 361382 73 1921 19 0% 0 0 53.698085
graphql-native (click) 354516 327796 39 532 0 0% 0 0 14.025043
knucleotide (click) 9997 11103 7 113 0 0% 0 0 5.13173
lee (click) 317211 279517 49 1094 0 0% 0 0 31.584601
matmul (click) 11103 4709 8 136 0 0% 0 0 4.220773
nbody (click) 14448 21176 6 251 0 0% 0 0 6.119299
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.397543
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 111.436857
protoboeuf (click) 169555 177006 12 2829 0 0% 0 0 72.116942
protoboeuf-encode (click) 242967 283659 14 1815 0 0% 0 0 44.29976
rack (click) 277080 268802 35 580 0 0% 0 0 15.12469
ruby-json (click) 20323 18532 8 206 0 0% 0 0 5.677758
rubyboy (click) 705437 606402 154 6868 42 0% 0 0 166.729551
rubykon (click) 146869 163015 137 2080 3 0% 0 0 56.480422
sudoku (click) 51704 65882 7 870 0 0% 0 0 23.063397
tinygql (click) 300500 246812 59 1031 5 0% 0 0 27.235883
30k_ifelse (click) 6222887 5052688 9260 75477 0 0% 0 0 1935.371439
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 491.510753
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.081816
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.505225
fib (click) 2659 2995 3 30 0 0% 0 0 1.135559
getivar (click) 3789 6778 3 79 0 0% 0 0 1.928442
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.324748
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.839835
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.928558
object-new (click) 2406 2818 2 36 0 0% 0 0 1.103852
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.177416
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.826867
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.800902
send_cfunc_block (click) 14429 12201 5 192 0 0% 0 0 4.158231
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.476951
setivar (click) 2783 3726 3 46 0 0% 0 0 1.258739
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.420885
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.734448
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.486476
structaref (click) 4407 9095 3 88 0 0% 0 0 2.343619
structaset (click) 3926 5614 3 70 0 0% 0 0 1.726414
throw (click) 5953 4624 5 53 0 0% 0 0 1.842872

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.