Ruby Benchmarks

Details for Benchmarks at 2026-01-20 00:42:36 UTC

YJIT metrics from the ruby-bench suite using Ruby 16adb9303f.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 96.5% faster than CRuby 4.1.0dev
  • 5.0% faster than YJIT 3.4.7
On railsbench it is
  • 115.6% faster than CRuby 4.1.0dev
  • 9.8% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 17 minutes
aarch64 runtime: 7 hours, 11 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 98 50 201 50 236
chunky-png 5 31 5 32 50 33 50 30
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 419 5 431 50 628 50 638
liquid-compile 5 418 5 474 50 584 50 714
liquid-render 5 170 5 174 50 435 50 432
mail 5 194 5 192 50 253 50 261
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 153 5 158 50 246 50 254
ruby-lsp 5 158 5 162 50 225 50 233
sequel 5 420 5 420 50 579 50 590
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 26 50 12 50 10
addressable-getters 5 165 5 165 50 184 50 191
addressable-join 5 74 5 74 50 66 50 69
addressable-merge 5 159 5 155 50 221 50 214
addressable-new 5 355 5 348 50 524 50 511
addressable-normalize 5 54 5 52 50 59 50 57
addressable-parse 5 103 5 104 50 103 50 105
addressable-setters 5 183 5 176 50 228 50 220
addressable-to-s 5 164 5 167 50 183 50 193
binarytrees 5 82 5 82 50 136 50 127
blurhash 5 83 5 87 50 143 50 144
erubi 5 130 5 144 50 125 50 141
etanni 5 98 5 70 50 71 50 36
fannkuchredux 5 55 5 57 50 102 50 108
fluentd 5 56 5 60 50 20 50 24
graphql 5 370 5 460 50 535 50 919
graphql-native 5 59 5 85 50 22 50 65
knucleotide 5 163 5 156 50 117 50 109
lee 5 23 5 22 50 10 50 10
matmul 5 51 5 56 50 94 50 95
nbody 5 247 5 270 50 676 50 704
nqueens 5 116 5 129 50 557 50 573
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 180 50 706 50 725
protoboeuf-encode 5 197 5 206 50 829 50 783
rack 5 446 5 442 50 716 50 682
ruby-json 5 82 5 96 50 50 50 72
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 156
tinygql 5 41 5 43 50 40 50 48
30k_ifelse 5 28 5 28 50 184 50 183
30k_methods 5 38 5 40 50 456 50 455
attr_accessor 5 157 5 208 50 1835 50 1937
cfunc_itself 5 347 5 346 50 1255 50 1259
fib 5 124 5 144 50 939 50 939
getivar 5 216 5 328 50 2317 50 2433
getivar-module 5 104 5 144 50 90 50 271
keyword_args 5 100 5 103 50 1240 50 1243
loops-times 5 23 5 26 50 64 50 62
object-new 5 268 5 365 50 297 50 675
respond_to 5 139 5 136 50 3892 50 3901
ruby-xor 5 237 5 231 50 1314 50 1290
send_bmethod 5 116 5 122 50 5538 50 4527
send_cfunc_block 5 105 5 106 50 352 50 341
send_rubyfunc_block 5 251 5 247 50 6919 50 6931
setivar 5 360 5 483 50 4925 50 5045
setivar_object 5 341 5 303 50 715 50 638
setivar_young 5 341 5 307 50 797 50 657
str_concat 5 391 5 445 50 1199 50 1214
structaref 5 156 5 204 50 1813 50 1895
structaset 5 203 5 246 50 394 50 487
throw 5 1087 5 1250 50 1421 50 1544

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) 1544392 1289025 203 2636 0 0% 0 0 76.351517
chunky-png (click) 320926 304361 79 1374 1 0% 0 0 39.242379
erubi-rails (click) 1363696 1205373 268 3636 22 0% 0 0 97.396463
hexapdf (click) 1520818 1262371 593 15660 44 0% 0 0 438.919741
liquid-c (click) 558061 522337 114 2231 5 0% 0 0 60.314839
liquid-compile (click) 478952 455460 146 2697 2 0% 0 0 79.659345
liquid-render (click) 664689 597061 131 2950 8 0% 0 0 79.513284
mail (click) 865915 827047 345 7700 40 0% 0 0 213.462576
psych-load (click) 287252 247680 61 829 2 0% 0 0 23.893585
railsbench (click) 3347530 2954275 1591 19796 97 0% 0 0 555.719713
rubocop (click) 5765640 4986845 3002 56959 126 0% 6 0 1683.66371
ruby-lsp (click) 1037475 930593 407 7369 46 0% 1 0 204.408377
sequel (click) 501805 429549 11 119 0 0% 0 0 3.864265
shipit (click) 7115770 6037573 3298 52018 169 0% 0 0 1778.073265
addressable-equality (click) 316984 276284 44 1388 1 0% 0 0 34.56699
addressable-getters (click) 277308 244307 26 863 0 0% 0 0 21.060165
addressable-join (click) 282403 252572 24 941 0 0% 0 0 23.638645
addressable-merge (click) 282713 238974 27 896 0 0% 0 0 22.147533
addressable-new (click) 258369 237530 21 579 0 0% 0 0 14.577913
addressable-normalize (click) 313144 272314 43 1351 1 0% 0 0 33.206626
addressable-parse (click) 280025 246182 26 880 0 0% 0 0 21.857186
addressable-setters (click) 257739 222379 20 582 0 0% 0 0 14.356375
addressable-to-s (click) 276166 241865 26 849 0 0% 0 0 20.887877
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.807643
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.113561
erubi (click) 247680 230981 6 132 0 0% 0 0 4.00071
etanni (click) 32837 27420 8 111 0 0% 0 0 3.484123
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.072918
fluentd (click) 483227 440689 7 115 0 0% 0 0 3.763659
graphql (click) 407825 374001 73 1895 19 1% 0 0 54.343802
graphql-native (click) 352959 309082 39 532 0 0% 0 0 14.006467
knucleotide (click) 9663 10633 7 107 0 0% 0 0 4.930243
lee (click) 316891 303405 49 1088 0 0% 0 0 31.31616
matmul (click) 11103 4709 8 136 0 0% 0 0 4.227134
nbody (click) 14448 21176 6 251 0 0% 0 0 6.157555
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.402902
optcarrot (click) 326157 307271 188 4744 34 0% 0 0 111.692995
protoboeuf (click) 169555 177006 12 2829 0 0% 0 0 72.8726
protoboeuf-encode (click) 242967 283659 14 1815 0 0% 0 0 44.606474
rack (click) 280463 256218 35 585 0 0% 0 0 15.283835
ruby-json (click) 20323 18532 8 206 0 0% 0 0 5.74527
rubyboy (click) 703771 670499 154 6871 42 0% 0 0 168.357532
rubykon (click) 147885 147937 137 2093 3 0% 0 0 56.711174
sudoku (click) 51704 65882 7 870 0 0% 0 0 23.140279
tinygql (click) 300164 271059 59 1025 5 0% 0 0 26.955006
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1967.750265
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 492.635725
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.095784
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.538609
fib (click) 2659 2995 3 30 0 0% 0 0 1.138099
getivar (click) 3789 6778 3 79 0 0% 0 0 1.938529
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.331
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.798515
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.909502
object-new (click) 2406 2818 2 36 0 0% 0 0 1.024681
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.166721
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.854926
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.831386
send_cfunc_block (click) 14429 12201 5 192 0 0% 0 0 4.165184
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.447844
setivar (click) 2783 3726 3 46 0 0% 0 0 1.293132
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.425827
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.714905
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.418715
structaref (click) 4407 9095 3 88 0 0% 0 0 2.325619
structaset (click) 4113 5834 3 70 0 0% 0 0 1.783585
throw (click) 5953 4624 5 53 0 0% 0 0 1.787581

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.