Ruby Benchmarks

Details for Benchmarks at 2026-07-02 01:19:43 UTC

YJIT metrics from the ruby-bench suite using Ruby 0ea1e09c6d.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 99.0% faster than CRuby 4.1.0dev
  • 9.3% faster than YJIT 3.4.7
On railsbench it is
  • 121.1% faster than CRuby 4.1.0dev
  • 16.8% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 1 minutes
aarch64 runtime: 7 hours, 50 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 94 50 199 50 242
chunky-png 5 32 5 30 50 34 50 25
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 422 5 442 50 615 50 675
liquid-compile 5 421 5 515 50 583 50 838
liquid-render 5 172 5 172 50 430 50 474
lobsters 5 20 5 21 50 10 50 10
mail 5 193 5 207 50 254 50 302
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 155 50 247 50 245
ruby-lsp 5 163 5 161 50 240 50 228
sequel 5 419 5 465 50 579 50 669
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 29 50 12 50 18
addressable-getters 5 164 5 171 50 183 50 208
addressable-join 5 75 5 83 50 66 50 83
addressable-merge 5 161 5 158 50 222 50 242
addressable-new 5 352 5 343 50 519 50 544
addressable-normalize 5 52 5 58 50 60 50 71
addressable-parse 5 103 5 105 50 103 50 117
addressable-setters 5 184 5 187 50 232 50 256
addressable-to-s 5 164 5 170 50 182 50 208
binarytrees 5 82 5 87 50 136 50 145
blurhash 5 83 5 84 50 145 50 145
erubi 5 130 5 150 50 125 50 152
etanni 5 100 5 80 50 72 50 47
fannkuchredux 5 55 5 58 50 100 50 106
fluentd 5 61 5 61 50 20 50 25
gcbench 5 10 5 10 50 10 50 16
graphql 5 366 5 466 50 568 50 958
graphql-native 5 58 5 84 50 21 50 71
knucleotide 5 163 5 142 50 117 50 96
lee 5 22 5 29 50 10 50 15
matmul 5 53 5 53 50 88 50 95
nbody 5 249 5 240 50 662 50 676
nqueens 5 119 5 129 50 554 50 573
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 181 50 697 50 792
protoboeuf-encode 5 201 5 201 50 802 50 782
rack 5 437 5 467 50 708 50 782
ruby-json 5 83 5 114 50 50 50 92
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 208 5 207 50 246 50 248
sudoku 5 48 5 50 50 155 50 157
tinygql 5 40 5 44 50 36 50 54
30k_ifelse 5 28 5 28 50 186 50 184
30k_methods 5 38 5 39 50 459 50 455
attr_accessor 5 156 5 184 50 1831 50 1890
cfunc_itself 5 349 5 313 50 1255 50 1258
fib 5 125 5 138 50 939 50 939
getivar 5 210 5 335 50 2305 50 2440
getivar-module 5 100 5 139 50 89 50 284
keyword_args 5 102 5 90 50 1239 50 1244
loops-times 5 23 5 26 50 63 50 62
object-new 5 268 5 475 50 295 50 1440
object-new-initialize 5 168 5 233 50 259 50 981
object-new-no-escape 5 80 5 137 50 89 50 494
respond_to 5 139 5 122 50 3898 50 3897
ruby-xor 5 246 5 237 50 1305 50 1311
send_bmethod 5 118 5 109 50 5538 50 4526
send_cfunc_block 5 107 5 102 50 305 50 294
send_rubyfunc_block 5 196 5 197 50 1372 50 1375
setivar 5 359 5 378 50 4930 50 4958
setivar_object 5 341 5 305 50 762 50 658
setivar_young 5 341 5 305 50 808 50 684
str_concat 5 390 5 423 50 1201 50 1044
structaref 5 153 5 187 50 1800 50 1871
structaset 5 198 5 202 50 369 50 484
throw 5 1109 5 1369 50 1442 50 1771

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) 1562227 1351069 203 2658 0 0% 0 0 78.147478
chunky-png (click) 325946 292438 79 1376 1 0% 0 0 38.120216
erubi-rails (click) 1384696 1205127 268 3626 23 0% 0 0 94.531594
hexapdf (click) 1535244 1290336 593 15767 44 0% 0 0 432.856759
liquid-c (click) 568228 529775 114 2240 5 0% 0 0 59.115444
liquid-compile (click) 480185 453036 146 2669 2 0% 0 0 73.532505
liquid-render (click) 671598 624676 131 2963 8 0% 0 0 77.360396
lobsters (click) 8550814 7092299 3125 63409 122 0% 0 0 2036.647358
mail (click) 877091 845512 345 7739 40 0% 0 0 209.876724
psych-load (click) 289972 233219 61 829 2 0% 0 0 23.300143
railsbench (click) 3358312 2827874 1592 19741 105 0% 0 0 542.131306
rubocop (click) 5803879 5014668 3002 57350 128 0% 6 0 1622.616468
ruby-lsp (click) 1053802 926570 409 7470 47 0% 1 0 199.584742
sequel (click) 509741 437585 11 119 0 0% 0 0 4.416231
shipit (click) 6884707 5780838 3133 50017 147 0% 0 0 1674.588338
addressable-equality (click) 322717 273434 44 1381 1 0% 0 0 33.355084
addressable-getters (click) 286285 253293 26 863 0 0% 0 0 20.316182
addressable-join (click) 291779 220918 24 941 0 0% 0 0 23.038834
addressable-merge (click) 291803 248047 27 896 0 0% 0 0 21.563881
addressable-new (click) 266639 229176 21 563 0 0% 0 0 13.66141
addressable-normalize (click) 318070 252018 43 1327 1 0% 0 0 31.611116
addressable-parse (click) 288997 263355 26 880 0 0% 0 0 21.102457
addressable-setters (click) 266829 231452 20 582 0 0% 0 0 14.056416
addressable-to-s (click) 285888 260434 26 849 0 0% 0 0 20.065316
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.79197
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.877337
erubi (click) 233825 203773 6 134 0 0% 0 0 3.929167
etanni (click) 32752 34339 8 114 0 0% 0 0 3.40683
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.736176
fluentd (click) 517903 478842 7 116 0 0% 0 0 3.528974
gcbench (click) 15640 8771 9 110 0 0% 0 0 3.341766
graphql (click) 416636 380765 74 1940 19 0% 0 0 52.7185
graphql-native (click) 358021 319422 39 532 0 0% 0 0 13.846314
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.725875
lee (click) 320900 338508 50 1102 0 0% 0 0 30.423843
matmul (click) 11103 4709 8 136 0 0% 0 0 4.114259
nbody (click) 14448 21176 6 251 0 0% 0 0 6.181267
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.245339
optcarrot (click) 321739 302768 188 4597 34 0% 0 0 105.714488
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.887394
protoboeuf-encode (click) 242245 233890 14 1820 0 0% 0 0 42.621129
rack (click) 289104 257356 35 581 0 0% 0 0 14.642502
ruby-json (click) 19699 17751 8 206 0 0% 0 0 5.840699
rubyboy (click) 709070 610109 154 6871 42 0% 0 0 163.619931
rubykon (click) 147788 154811 138 2094 4 0% 0 0 54.728233
splay (click) 34617 22483 9 175 0 0% 0 0 5.34592
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.772242
tinygql (click) 305123 267690 59 1026 5 0% 0 0 26.427974
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1866.554918
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 477.102403
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.074989
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.457579
fib (click) 2659 2995 3 30 0 0% 0 0 1.07762
getivar (click) 3789 6778 3 79 0 0% 0 0 1.933429
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.311526
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.809773
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.923322
object-new (click) 2406 2818 2 36 0 0% 0 0 0.997935
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.300068
object-new-no-escape (click) 4295 4675 5 63 0 0% 0 0 1.772643
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.133349
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.799948
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.811428
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.280878
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.74038
setivar (click) 2783 3726 3 46 0 0% 0 0 1.256713
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.392917
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.708901
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.465295
structaref (click) 4407 9095 3 88 0 0% 0 0 2.320506
structaset (click) 4113 5834 3 70 0 0% 0 0 1.798723
throw (click) 5953 4624 5 53 0 0% 0 0 1.761619

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.