Ruby Benchmarks

Details for Benchmarks at 2026-02-07 00:49:10 UTC

YJIT metrics from the ruby-bench suite using Ruby ff55280320.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 95.5% faster than CRuby 4.1.0dev
  • 7.3% faster than YJIT 3.4.7
On railsbench it is
  • 116.6% faster than CRuby 4.1.0dev
  • 12.6% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 9 minutes
aarch64 runtime: 7 hours, 2 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 191 50 226
chunky-png 5 31 5 33 50 33 50 30
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 420 5 433 50 627 50 639
liquid-compile 5 417 5 482 50 581 50 738
liquid-render 5 171 5 173 50 430 50 434
lobsters 5 20 5 20 50 10 50 10
mail 5 195 5 193 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 247 50 254
ruby-lsp 5 160 5 163 50 226 50 236
sequel 5 425 5 432 50 592 50 624
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 27 50 11 50 13
addressable-getters 5 164 5 171 50 184 50 202
addressable-join 5 72 5 77 50 63 50 73
addressable-merge 5 160 5 160 50 223 50 227
addressable-new 5 353 5 357 50 520 50 537
addressable-normalize 5 53 5 55 50 59 50 62
addressable-parse 5 103 5 106 50 105 50 111
addressable-setters 5 183 5 188 50 230 50 242
addressable-to-s 5 164 5 172 50 183 50 199
binarytrees 5 82 5 86 50 136 50 146
blurhash 5 83 5 88 50 143 50 144
erubi 5 139 5 149 50 132 50 148
etanni 5 98 5 72 50 71 50 39
fannkuchredux 5 54 5 57 50 102 50 106
fluentd 5 60 5 65 50 19 50 26
graphql 5 371 5 474 50 575 50 954
graphql-native 5 59 5 87 50 22 50 68
knucleotide 5 163 5 157 50 117 50 111
lee 5 23 5 23 50 10 50 10
matmul 5 51 5 56 50 95 50 98
nbody 5 247 5 300 50 676 50 659
nqueens 5 116 5 127 50 555 50 574
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 177 5 173 50 705 50 778
protoboeuf-encode 5 197 5 202 50 834 50 825
rack 5 441 5 453 50 722 50 737
ruby-json 5 82 5 101 50 50 50 74
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 167
tinygql 5 41 5 44 50 40 50 48
30k_ifelse 5 28 5 28 50 184 50 183
30k_methods 5 38 5 40 50 452 50 455
attr_accessor 5 157 5 216 50 1834 50 1947
cfunc_itself 5 348 5 362 50 1255 50 1259
fib 5 124 5 144 50 938 50 939
getivar 5 215 5 309 50 2316 50 2417
getivar-module 5 103 5 135 50 90 50 267
keyword_args 5 99 5 97 50 1240 50 1243
loops-times 5 23 5 25 50 64 50 63
object-new 5 268 5 384 50 297 50 772
respond_to 5 138 5 132 50 3873 50 3889
ruby-xor 5 236 5 240 50 1312 50 1282
send_bmethod 5 116 5 122 50 5538 50 4527
send_cfunc_block 5 105 5 105 50 353 50 339
send_rubyfunc_block 5 250 5 252 50 6923 50 6922
setivar 5 359 5 480 50 4925 50 5036
setivar_object 5 341 5 304 50 752 50 643
setivar_young 5 341 5 307 50 798 50 662
str_concat 5 390 5 437 50 1196 50 1193
structaref 5 156 5 203 50 1812 50 1905
structaset 5 202 5 250 50 395 50 480
throw 5 1089 5 1347 50 1410 50 1662

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) 1537686 1267953 202 2573 0 0% 0 0 73.255459
chunky-png (click) 319888 261709 79 1374 1 0% 0 0 39.150567
erubi-rails (click) 1367571 1152314 268 3651 22 0% 0 0 97.885096
hexapdf (click) 1522761 1329537 593 15686 44 0% 0 0 441.393178
liquid-c (click) 557835 530254 114 2231 5 0% 0 0 59.930296
liquid-compile (click) 478781 455351 146 2701 2 0% 0 0 79.709007
liquid-render (click) 664002 636706 131 2950 8 0% 0 0 79.952231
lobsters (click) 8688871 7496175 3123 64044 117 0% 0 0 2206.038646
mail (click) 865284 817472 345 7700 40 0% 0 0 214.021892
psych-load (click) 288093 249195 61 829 2 0% 0 0 24.162472
railsbench (click) 3353636 3005659 1591 19821 97 0% 0 0 558.054167
rubocop (click) 5765712 4996117 3002 56924 125 0% 6 0 1672.476223
ruby-lsp (click) 1030548 874271 408 7410 46 0% 1 0 205.957892
sequel (click) 503601 431396 11 119 0 0% 0 0 4.046433
shipit (click) 7117513 6260298 3298 51967 169 0% 0 0 1731.542848
addressable-equality (click) 315838 250548 44 1379 1 0% 0 0 34.687926
addressable-getters (click) 277303 252479 26 863 0 0% 0 0 20.986104
addressable-join (click) 282775 236535 24 941 0 0% 0 0 23.738373
addressable-merge (click) 282869 255549 27 898 0 0% 0 0 22.294249
addressable-new (click) 260962 223050 21 633 0 0% 0 0 15.587254
addressable-normalize (click) 313939 273546 43 1345 1 0% 0 0 33.671554
addressable-parse (click) 280181 254565 26 882 0 0% 0 0 22.040482
addressable-setters (click) 257895 222570 20 584 0 0% 0 0 14.508479
addressable-to-s (click) 275048 240869 26 849 0 0% 0 0 20.927261
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.810288
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.396834
erubi (click) 246640 212867 6 132 0 0% 0 0 3.901152
etanni (click) 32837 27420 8 111 0 0% 0 0 3.501767
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.152884
fluentd (click) 485962 443871 7 115 0 0% 0 0 3.78598
graphql (click) 409420 383766 73 1895 19 1% 0 0 53.842251
graphql-native (click) 350362 330607 39 532 0 0% 0 0 14.197998
knucleotide (click) 9663 10633 7 107 0 0% 0 0 4.878671
lee (click) 318377 288548 49 1088 0 0% 0 0 31.351829
matmul (click) 11103 4709 8 136 0 0% 0 0 4.276479
nbody (click) 14448 21176 6 251 0 0% 0 0 6.252135
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.439681
optcarrot (click) 326157 307271 188 4744 34 0% 0 0 112.222656
protoboeuf (click) 169555 177006 12 2829 0 0% 0 0 73.26516
protoboeuf-encode (click) 242967 283659 14 1815 0 0% 0 0 44.866777
rack (click) 277209 252343 35 580 0 0% 0 0 15.436626
ruby-json (click) 20323 18532 8 206 0 0% 0 0 5.725352
rubyboy (click) 701687 610949 154 6871 42 0% 0 0 168.661555
rubykon (click) 148982 149243 138 2107 4 0% 0 0 57.395451
sudoku (click) 51704 65882 7 870 0 0% 0 0 23.224301
tinygql (click) 299655 220708 59 1031 5 0% 0 0 27.356452
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1963.701447
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 492.934204
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.069934
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.505447
fib (click) 2659 2995 3 30 0 0% 0 0 1.117926
getivar (click) 3789 6778 3 79 0 0% 0 0 1.931155
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.328851
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.823894
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.931279
object-new (click) 2406 2818 2 36 0 0% 0 0 1.044752
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.162981
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.800572
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.831097
send_cfunc_block (click) 14429 12201 5 192 0 0% 0 0 4.149669
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.485403
setivar (click) 2783 3726 3 46 0 0% 0 0 1.292795
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.440761
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.753228
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.467131
structaref (click) 4407 9095 3 88 0 0% 0 0 2.35104
structaset (click) 4113 5834 3 70 0 0% 0 0 1.767102
throw (click) 5953 4624 5 53 0 0% 0 0 1.755044

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.