Ruby Benchmarks

Details for Benchmarks at 2026-06-13 01:26:51 UTC

YJIT metrics from the ruby-bench suite using Ruby 533abc7ded.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 100.2% faster than CRuby 4.1.0dev
  • 9.8% faster than YJIT 3.4.7
On railsbench it is
  • 120.9% faster than CRuby 4.1.0dev
  • 16.9% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 2 minutes
aarch64 runtime: 7 hours, 52 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 93 5 95 50 203 50 238
chunky-png 5 32 5 31 50 34 50 28
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 421 5 443 50 619 50 678
liquid-compile 5 418 5 518 50 580 50 839
liquid-render 5 171 5 171 50 430 50 468
lobsters 5 20 5 21 50 10 50 10
mail 5 194 5 206 50 255 50 307
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 154 50 249 50 251
ruby-lsp 5 158 5 159 50 225 50 223
sequel 5 419 5 457 50 597 50 656
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 29 50 12 50 19
addressable-getters 5 164 5 172 50 183 50 214
addressable-join 5 75 5 83 50 66 50 85
addressable-merge 5 160 5 160 50 222 50 250
addressable-new 5 352 5 348 50 521 50 551
addressable-normalize 5 53 5 58 50 61 50 72
addressable-parse 5 104 5 107 50 103 50 123
addressable-setters 5 185 5 187 50 233 50 261
addressable-to-s 5 165 5 172 50 181 50 210
binarytrees 5 81 5 87 50 136 50 144
blurhash 5 84 5 84 50 145 50 145
erubi 5 141 5 154 50 140 50 159
etanni 5 100 5 82 50 73 50 49
fannkuchredux 5 55 5 57 50 100 50 106
fluentd 5 69 5 65 50 20 50 27
gcbench 5 10 5 10 50 10 50 16
graphql 5 373 5 452 50 565 50 960
graphql-native 5 57 5 89 50 22 50 71
knucleotide 5 163 5 141 50 118 50 94
lee 5 23 5 31 50 10 50 17
matmul 5 53 5 52 50 88 50 95
nbody 5 250 5 246 50 662 50 692
nqueens 5 114 5 128 50 554 50 578
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 176 50 697 50 794
protoboeuf-encode 5 201 5 200 50 796 50 797
rack 5 447 5 469 50 707 50 802
ruby-json 5 83 5 114 50 50 50 94
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 21 50 10 50 10
splay 5 209 5 206 50 250 50 245
sudoku 5 48 5 50 50 155 50 168
tinygql 5 42 5 43 50 40 50 54
30k_ifelse 5 28 5 28 50 174 50 183
30k_methods 5 39 5 39 50 459 50 460
attr_accessor 5 157 5 181 50 1832 50 1887
cfunc_itself 5 347 5 311 50 1255 50 1258
fib 5 125 5 135 50 939 50 939
getivar 5 210 5 323 50 2277 50 2435
getivar-module 5 103 5 138 50 89 50 282
keyword_args 5 103 5 107 50 1240 50 1245
loops-times 5 23 5 26 50 63 50 63
object-new 5 268 5 478 50 297 50 1444
object-new-initialize 5 169 5 237 50 260 50 981
object-new-no-escape 5 81 5 138 50 89 50 509
respond_to 5 139 5 122 50 3906 50 3895
ruby-xor 5 247 5 237 50 1306 50 1313
send_bmethod 5 118 5 109 50 5539 50 4526
send_cfunc_block 5 107 5 105 50 306 50 292
send_rubyfunc_block 5 196 5 198 50 1372 50 1375
setivar 5 359 5 399 50 4930 50 4980
setivar_object 5 341 5 306 50 764 50 596
setivar_young 5 342 5 307 50 810 50 603
str_concat 5 392 5 438 50 1201 50 1112
structaref 5 154 5 181 50 1800 50 1864
structaset 5 193 5 231 50 371 50 487
throw 5 1109 5 1396 50 1441 50 1786

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) 1557794 1326981 203 2658 0 0% 0 0 73.786187
chunky-png (click) 325387 274948 79 1376 1 0% 0 0 38.348157
erubi-rails (click) 1385323 1237789 268 3626 23 0% 0 0 100.667996
hexapdf (click) 1534079 1337417 593 15767 44 0% 0 0 430.308325
liquid-c (click) 563630 490062 114 2240 5 0% 0 0 60.133066
liquid-compile (click) 481571 388389 146 2669 2 0% 0 0 73.660984
liquid-render (click) 669992 580668 131 2963 8 0% 0 0 78.513707
lobsters (click) 8564208 7255909 3123 63521 122 0% 0 0 2028.990077
mail (click) 876654 835318 345 7738 40 0% 0 0 209.724263
psych-load (click) 292700 277326 61 829 2 0% 0 0 23.443436
railsbench (click) 3355243 2920236 1592 19740 105 0% 0 0 535.826004
rubocop (click) 5802558 5077002 3002 57363 127 0% 6 0 1640.394835
ruby-lsp (click) 1052487 890842 409 7470 47 0% 1 0 204.194721
sequel (click) 507681 434035 11 119 0 0% 0 0 4.178342
shipit (click) 7093224 6059942 3122 50084 147 0% 0 0 1608.811166
addressable-equality (click) 306548 294788 44 1380 1 0% 0 0 33.398652
addressable-getters (click) 285844 235915 26 863 0 0% 0 0 20.473395
addressable-join (click) 281574 248196 24 941 0 0% 0 0 22.79304
addressable-merge (click) 272285 248801 27 896 0 0% 0 0 21.132434
addressable-new (click) 250078 208205 21 563 0 0% 0 0 13.551992
addressable-normalize (click) 301955 281633 43 1327 1 0% 0 0 31.836631
addressable-parse (click) 285276 249921 26 880 0 0% 0 0 21.034973
addressable-setters (click) 247311 232206 20 582 0 0% 0 0 13.938823
addressable-to-s (click) 285386 234791 26 849 0 0% 0 0 20.302922
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.751339
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.810226
erubi (click) 252235 241817 6 134 0 0% 0 0 3.830921
etanni (click) 32989 26478 8 114 0 0% 0 0 3.435313
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.858695
fluentd (click) 513496 504556 7 116 0 0% 0 0 3.80896
gcbench (click) 15640 8771 9 110 0 0% 0 0 3.400027
graphql (click) 408376 352580 73 1931 19 0% 0 0 53.121319
graphql-native (click) 358100 326454 39 532 0 0% 0 0 13.856569
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.80346
lee (click) 321767 305925 49 1093 0 0% 0 0 30.383905
matmul (click) 11103 4709 8 136 0 0% 0 0 4.139539
nbody (click) 14448 21176 6 251 0 0% 0 0 6.223824
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.278372
optcarrot (click) 321739 302768 188 4597 34 0% 0 0 107.332233
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.993245
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 43.085239
rack (click) 284658 275596 35 581 0 0% 0 0 14.621169
ruby-json (click) 19462 17420 8 206 0 0% 0 0 5.828264
rubyboy (click) 705529 613328 154 6871 42 0% 0 0 162.769537
rubykon (click) 147788 154811 138 2094 4 0% 0 0 55.138194
splay (click) 34617 22483 9 175 0 0% 0 0 5.287326
sudoku (click) 51776 65830 7 871 0 0% 0 0 23.054916
tinygql (click) 304663 282971 59 1026 5 0% 0 0 26.558658
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1873.02883
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 476.97808
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.097698
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.530344
fib (click) 2659 2995 3 30 0 0% 0 0 1.113386
getivar (click) 3789 6778 3 79 0 0% 0 0 1.938876
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.338745
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.836894
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.874442
object-new (click) 2406 2818 2 36 0 0% 0 0 1.007261
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.295883
object-new-no-escape (click) 4295 4675 5 63 0 0% 0 0 1.749172
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.116792
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.827142
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.812643
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.298573
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.755381
setivar (click) 2783 3726 3 46 0 0% 0 0 1.27476
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.402959
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.742677
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.435149
structaref (click) 4407 9095 3 88 0 0% 0 0 2.377842
structaset (click) 4113 5834 3 70 0 0% 0 0 1.796835
throw (click) 5953 4624 5 53 0 0% 0 0 1.798827

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.