Ruby Benchmarks

Details for Benchmarks at 2026-02-01 00:59:27 UTC

YJIT metrics from the ruby-bench suite using Ruby 14ccd15156.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 94.5% faster than CRuby 4.1.0dev
  • 6.7% faster than YJIT 3.4.7
On railsbench it is
  • 114.9% faster than CRuby 4.1.0dev
  • 12.8% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 8 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 99 50 191 50 233
chunky-png 5 31 5 32 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 422 5 431 50 625 50 647
liquid-compile 5 405 5 472 50 582 50 737
liquid-render 5 170 5 178 50 433 50 435
lobsters 5 20 5 20 50 10 50 10
mail 5 195 5 194 50 254 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 248 50 253
ruby-lsp 5 160 5 163 50 225 50 230
sequel 5 426 5 430 50 583 50 624
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 28 50 11 50 12
addressable-getters 5 164 5 173 50 183 50 196
addressable-join 5 73 5 78 50 66 50 70
addressable-merge 5 160 5 159 50 222 50 222
addressable-new 5 353 5 361 50 525 50 531
addressable-normalize 5 53 5 55 50 59 50 60
addressable-parse 5 103 5 107 50 104 50 108
addressable-setters 5 185 5 184 50 230 50 231
addressable-to-s 5 163 5 169 50 183 50 195
binarytrees 5 82 5 86 50 136 50 146
blurhash 5 83 5 85 50 143 50 145
erubi 5 138 5 148 50 136 50 154
etanni 5 97 5 73 50 71 50 40
fannkuchredux 5 55 5 56 50 101 50 107
fluentd 5 57 5 65 50 27 50 31
graphql 5 371 5 471 50 571 50 955
graphql-native 5 57 5 88 50 20 50 67
knucleotide 5 163 5 161 50 118 50 114
lee 5 23 5 23 50 10 50 10
matmul 5 51 5 50 50 94 50 97
nbody 5 246 5 260 50 677 50 652
nqueens 5 116 5 127 50 556 50 576
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 183 50 706 50 780
protoboeuf-encode 5 194 5 208 50 840 50 838
rack 5 439 5 459 50 712 50 721
ruby-json 5 82 5 102 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 49 50 157 50 169
tinygql 5 42 5 43 50 40 50 50
30k_ifelse 5 28 5 28 50 185 50 184
30k_methods 5 38 5 41 50 449 50 459
attr_accessor 5 157 5 216 50 1834 50 1948
cfunc_itself 5 348 5 347 50 1255 50 1259
fib 5 124 5 147 50 940 50 939
getivar 5 217 5 331 50 2316 50 2435
getivar-module 5 104 5 140 50 90 50 269
keyword_args 5 100 5 108 50 1240 50 1242
loops-times 5 23 5 27 50 64 50 63
object-new 5 268 5 385 50 297 50 770
respond_to 5 139 5 138 50 3888 50 3899
ruby-xor 5 236 5 244 50 1314 50 1284
send_bmethod 5 117 5 125 50 5538 50 4527
send_cfunc_block 5 106 5 107 50 353 50 352
send_rubyfunc_block 5 250 5 246 50 6921 50 6928
setivar 5 359 5 475 50 4928 50 5043
setivar_object 5 337 5 303 50 754 50 644
setivar_young 5 341 5 306 50 797 50 661
str_concat 5 390 5 451 50 1201 50 1165
structaref 5 157 5 216 50 1813 50 1914
structaset 5 200 5 265 50 396 50 496
throw 5 1089 5 1388 50 1421 50 1715

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) 1542426 1336947 203 2635 0 0% 0 0 74.688926
chunky-png (click) 320926 304361 79 1374 1 0% 0 0 38.854941
erubi-rails (click) 1368847 1195218 269 3667 22 0% 0 0 97.958158
hexapdf (click) 1520304 1416718 593 15664 44 0% 0 0 437.777806
liquid-c (click) 557828 505700 114 2231 5 0% 0 0 59.85208
liquid-compile (click) 479819 463705 146 2714 2 0% 0 0 79.491654
liquid-render (click) 664463 596786 131 2950 8 0% 0 0 79.691993
lobsters (click) 8679300 7235536 3124 63985 117 0% 0 0 2145.022693
mail (click) 864828 817089 345 7700 40 0% 0 0 213.013374
psych-load (click) 287208 239459 61 829 2 0% 0 0 23.683221
railsbench (click) 3336518 2919419 1591 19666 97 0% 0 0 553.819556
rubocop (click) 5759086 5036056 3002 56876 125 0% 6 0 1661.906981
ruby-lsp (click) 1037099 946655 408 7395 47 0% 1 0 205.878443
sequel (click) 501717 437663 11 119 0 0% 0 0 3.897099
shipit (click) 7269714 6293359 3379 53755 170 0% 1 0 1766.492708
addressable-equality (click) 317783 269578 44 1388 1 0% 0 0 34.692741
addressable-getters (click) 275738 209463 26 863 0 0% 0 0 20.731635
addressable-join (click) 282677 252780 24 941 0 0% 0 0 23.40787
addressable-merge (click) 282546 255312 27 898 0 0% 0 0 22.406755
addressable-new (click) 259105 213836 21 591 0 0% 0 0 14.969492
addressable-normalize (click) 311600 270572 43 1326 1 0% 0 0 32.726184
addressable-parse (click) 279793 237852 26 880 0 0% 0 0 21.776796
addressable-setters (click) 257507 222241 20 582 0 0% 0 0 14.363967
addressable-to-s (click) 278877 245673 26 889 0 0% 0 0 21.387085
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.760704
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.178694
erubi (click) 246037 204273 6 132 0 0% 0 0 3.926493
etanni (click) 32837 27420 8 111 0 0% 0 0 3.492311
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.988009
fluentd (click) 484937 417500 7 115 0 0% 0 0 3.763731
graphql (click) 408623 350964 73 1895 19 1% 0 0 53.447844
graphql-native (click) 351956 340200 39 532 0 0% 0 0 14.32182
knucleotide (click) 9663 10633 7 107 0 0% 0 0 6.592447
lee (click) 316935 287050 49 1088 0 0% 0 0 31.097912
matmul (click) 11103 4709 8 136 0 0% 0 0 4.234366
nbody (click) 14448 21176 6 251 0 0% 0 0 6.122847
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.32032
optcarrot (click) 326157 307271 188 4744 34 0% 0 0 110.597487
protoboeuf (click) 169555 177006 12 2829 0 0% 0 0 72.370265
protoboeuf-encode (click) 242967 283659 14 1815 0 0% 0 0 44.218436
rack (click) 281062 249803 35 627 0 0% 0 0 16.343206
ruby-json (click) 20323 18532 8 206 0 0% 0 0 5.695089
rubyboy (click) 704379 622570 154 6869 42 0% 0 0 168.179278
rubykon (click) 147478 130977 137 2088 3 0% 0 0 56.522728
sudoku (click) 51704 65882 7 870 0 0% 0 0 23.205505
tinygql (click) 299904 253763 59 1031 5 0% 0 0 26.905791
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1947.944795
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 492.046401
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.087508
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.555135
fib (click) 2659 2995 3 30 0 0% 0 0 1.131257
getivar (click) 3789 6778 3 79 0 0% 0 0 1.917489
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.340168
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.798171
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.899263
object-new (click) 2406 2818 2 36 0 0% 0 0 1.052652
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.130246
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.782235
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.824435
send_cfunc_block (click) 14429 12201 5 192 0 0% 0 0 4.104996
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.454536
setivar (click) 2783 3726 3 46 0 0% 0 0 1.261207
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.408899
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.727026
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.439449
structaref (click) 4407 9095 3 88 0 0% 0 0 2.345047
structaset (click) 4113 5834 3 70 0 0% 0 0 1.759349
throw (click) 5953 4624 5 53 0 0% 0 0 1.808173

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.