Ruby Benchmarks

Details for Benchmarks at 2026-04-27 01:08:45 UTC

YJIT metrics from the ruby-bench suite using Ruby 8e253ae2d5.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 99.0% faster than CRuby 4.1.0dev
  • 8.3% faster than YJIT 3.4.7
On railsbench it is
  • 114.5% faster than CRuby 4.1.0dev
  • 10.7% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 60 minutes
aarch64 runtime: 7 hours, 49 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 90 5 98 50 200 50 239
chunky-png 5 31 5 30 50 34 50 27
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 422 5 435 50 618 50 668
liquid-compile 5 422 5 481 50 580 50 745
liquid-render 5 171 5 174 50 429 50 459
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 200 50 251 50 288
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 152 50 247 50 253
ruby-lsp 5 163 5 161 50 226 50 230
sequel 5 421 5 450 50 599 50 630
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 27 50 12 50 12
addressable-getters 5 165 5 165 50 184 50 195
addressable-join 5 74 5 79 50 66 50 73
addressable-merge 5 162 5 152 50 222 50 220
addressable-new 5 355 5 337 50 522 50 505
addressable-normalize 5 53 5 54 50 59 50 60
addressable-parse 5 104 5 103 50 103 50 109
addressable-setters 5 185 5 177 50 235 50 235
addressable-to-s 5 163 5 164 50 182 50 194
binarytrees 5 82 5 85 50 136 50 143
blurhash 5 84 5 76 50 145 50 145
erubi 5 138 5 149 50 140 50 153
etanni 5 100 5 78 50 73 50 45
fannkuchredux 5 55 5 57 50 100 50 104
fluentd 5 62 5 63 50 21 50 34
gcbench 5 10 5 10 50 10 50 15
graphql 5 372 5 448 50 571 50 952
graphql-native 5 59 5 89 50 21 50 68
knucleotide 5 163 5 147 50 117 50 101
lee 5 23 5 29 50 10 50 12
matmul 5 53 5 57 50 88 50 95
nbody 5 250 5 277 50 665 50 701
nqueens 5 119 5 123 50 554 50 579
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 181 50 698 50 784
protoboeuf-encode 5 201 5 194 50 800 50 817
rack 5 448 5 438 50 715 50 706
ruby-json 5 84 5 107 50 50 50 85
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 209 5 226 50 250 50 283
sudoku 5 48 5 49 50 155 50 160
tinygql 5 41 5 42 50 35 50 53
30k_ifelse 5 28 5 28 50 186 50 184
30k_methods 5 38 5 39 50 454 50 456
attr_accessor 5 157 5 186 50 1822 50 1900
cfunc_itself 5 347 5 328 50 1255 50 1259
fib 5 124 5 132 50 939 50 939
getivar 5 216 5 297 50 2306 50 2410
getivar-module 5 103 5 136 50 89 50 267
keyword_args 5 102 5 100 50 1240 50 1242
loops-times 5 23 5 25 50 63 50 61
object-new 5 268 5 470 50 296 50 1515
object-new-initialize 5 169 5 254 50 259 50 1022
object-new-no-escape 5 81 5 134 50 89 50 518
respond_to 5 139 5 126 50 3902 50 3902
ruby-xor 5 247 5 226 50 1305 50 1296
send_bmethod 5 118 5 116 50 5539 50 4526
send_cfunc_block 5 106 5 107 50 303 50 308
send_rubyfunc_block 5 195 5 207 50 1372 50 1375
setivar 5 359 5 474 50 4930 50 5038
setivar_object 5 341 5 351 50 762 50 653
setivar_young 5 342 5 351 50 808 50 692
str_concat 5 391 5 438 50 1200 50 1173
structaref 5 153 5 195 50 1799 50 1883
structaset 5 198 5 216 50 371 50 477
throw 5 1108 5 1386 50 1439 50 1815

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) 1559636 1386141 204 2676 0 0% 0 0 74.825364
chunky-png (click) 321822 294862 79 1376 1 0% 0 0 38.220396
erubi-rails (click) 1377114 1201798 268 3626 23 0% 0 0 99.951628
hexapdf (click) 1519916 1384707 594 15788 44 0% 0 0 428.545908
liquid-c (click) 565068 458982 114 2240 5 0% 0 0 59.508345
liquid-compile (click) 485726 483031 146 2771 2 0% 0 0 88.361117
liquid-render (click) 669292 563637 131 2963 8 0% 0 0 77.064384
lobsters (click) 8592511 7282603 3126 63886 122 0% 0 0 2072.184283
mail (click) 875107 873586 345 7738 40 0% 0 0 208.210003
psych-load (click) 292898 252665 61 833 2 0% 0 0 23.781873
railsbench (click) 3357227 2863092 1592 19774 104 0% 0 0 535.298704
rubocop (click) 5788225 4977633 3002 57178 127 0% 6 0 1640.099758
ruby-lsp (click) 1045908 857496 409 7472 47 0% 1 0 198.976525
sequel (click) 506817 465743 11 121 0 0% 0 0 5.634179
shipit (click) 7212219 6050376 3117 50226 148 0% 0 0 1594.986042
addressable-equality (click) 322184 281397 44 1396 1 0% 0 0 35.679268
addressable-getters (click) 279306 203615 26 869 0 0% 0 0 21.761038
addressable-join (click) 283857 227631 24 941 0 0% 0 0 26.695756
addressable-merge (click) 287489 259359 27 900 0 0% 0 0 23.319958
addressable-new (click) 262529 248859 21 569 0 0% 0 0 14.390106
addressable-normalize (click) 302732 249552 43 1352 1 0% 0 0 33.819939
addressable-parse (click) 280868 237268 26 882 0 0% 0 0 22.746631
addressable-setters (click) 262194 250590 20 582 0 0% 0 0 15.785601
addressable-to-s (click) 280497 228899 26 853 0 0% 0 0 22.30387
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.724826
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.930692
erubi (click) 250707 198451 6 134 0 0% 0 0 3.862058
etanni (click) 32989 26478 8 114 0 0% 0 0 3.394814
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.731715
fluentd (click) 488970 460030 7 116 0 0% 0 0 3.552786
gcbench (click) 15808 8981 9 110 0 0% 0 0 3.602361
graphql (click) 413615 367870 73 1931 19 0% 0 0 52.608401
graphql-native (click) 354199 305978 39 532 0 0% 0 0 13.837766
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.595058
lee (click) 318786 269035 49 1099 0 0% 0 0 30.418403
matmul (click) 11103 4709 8 136 0 0% 0 0 4.141379
nbody (click) 14448 21176 6 251 0 0% 0 0 6.080645
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.159673
optcarrot (click) 321739 302768 188 4597 34 0% 0 0 106.556279
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.593932
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 43.080301
rack (click) 284716 242790 35 581 0 0% 0 0 15.763257
ruby-json (click) 19699 17751 8 206 0 0% 0 0 5.676351
rubyboy (click) 708976 666783 154 6873 42 0% 0 0 162.431845
rubykon (click) 148777 155950 138 2107 4 0% 0 0 55.209381
splay (click) 34953 22682 9 175 0 0% 0 0 5.170475
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.799241
tinygql (click) 301915 262694 59 1032 5 0% 0 0 26.491268
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1853.818604
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 473.133069
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.086993
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.47988
fib (click) 2659 2995 3 30 0 0% 0 0 1.092525
getivar (click) 3789 6778 3 79 0 0% 0 0 1.875739
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.319456
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.772662
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.92807
object-new (click) 2406 2818 2 36 0 0% 0 0 0.963755
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.285468
object-new-no-escape (click) 4540 5102 5 68 0 0% 0 0 1.985169
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.135382
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.798685
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.794295
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.270621
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.767193
setivar (click) 2783 3726 3 46 0 0% 0 0 1.251921
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.405972
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.716148
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.426438
structaref (click) 4407 9095 3 88 0 0% 0 0 2.340681
structaset (click) 4113 5834 3 70 0 0% 0 0 1.761338
throw (click) 5953 4624 5 53 0 0% 0 0 1.726544

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.