Ruby Benchmarks

Details for Benchmarks at 2026-01-02 00:43:46 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 97.6% faster than CRuby 4.1.0dev
  • 5.1% faster than YJIT 3.4.7
On railsbench it is
  • 112.9% faster than CRuby 4.1.0dev
  • 9.6% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 11 minutes
aarch64 runtime: 7 hours, 6 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 97 50 197 50 222
chunky-png 5 31 5 32 50 32 50 30
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 422 5 428 50 629 50 636
liquid-compile 5 418 5 472 50 583 50 712
liquid-render 5 172 5 176 50 435 50 428
mail 5 195 5 191 50 254 50 260
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 155 5 158 50 247 50 249
ruby-lsp 5 138 5 147 50 224 50 248
sequel 5 422 5 425 50 603 50 590
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 27 50 11 50 10
addressable-getters 5 164 5 167 50 184 50 190
addressable-join 5 73 5 78 50 64 50 67
addressable-merge 5 160 5 157 50 222 50 212
addressable-new 5 352 5 350 50 527 50 513
addressable-normalize 5 53 5 54 50 58 50 57
addressable-parse 5 103 5 104 50 105 50 107
addressable-setters 5 184 5 180 50 228 50 227
addressable-to-s 5 163 5 166 50 183 50 190
binarytrees 5 82 5 81 50 136 50 127
blurhash 5 83 5 88 50 143 50 145
erubi 5 136 5 148 50 122 50 151
etanni 5 98 5 69 50 72 50 34
fannkuchredux 5 55 5 57 50 101 50 104
fluentd 5 62 5 60 50 20 50 32
graphql 5 373 5 458 50 569 50 957
graphql-native 5 57 5 85 50 22 50 64
knucleotide 5 163 5 156 50 118 50 110
lee 5 23 5 24 50 10 50 10
matmul 5 51 5 54 50 94 50 96
nbody 5 247 5 272 50 666 50 706
nqueens 5 116 5 126 50 556 50 590
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 178 50 706 50 718
protoboeuf-encode 5 196 5 198 50 828 50 794
rack 5 440 5 452 50 705 50 698
ruby-json 5 81 5 97 50 50 50 69
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
sudoku 5 48 5 50 50 156 50 164
tinygql 5 42 5 44 50 36 50 48
30k_ifelse 5 28 5 28 50 185 50 182
30k_methods 5 38 5 41 50 455 50 456
attr_accessor 5 157 5 206 50 1837 50 1934
cfunc_itself 5 347 5 353 50 1255 50 1259
fib 5 124 5 141 50 939 50 940
getivar 5 217 5 325 50 2315 50 2429
getivar-module 5 104 5 144 50 90 50 271
keyword_args 5 100 5 109 50 1240 50 1242
loops-times 5 23 5 25 50 63 50 61
object-new 5 268 5 366 50 300 50 680
respond_to 5 139 5 141 50 3887 50 3901
ruby-xor 5 238 5 248 50 1314 50 1287
send_bmethod 5 116 5 118 50 5538 50 4528
send_cfunc_block 5 106 5 104 50 353 50 339
send_rubyfunc_block 5 251 5 246 50 6920 50 6920
setivar 5 360 5 488 50 4926 50 5048
setivar_object 5 341 5 304 50 751 50 538
setivar_young 5 341 5 307 50 795 50 560
str_concat 5 390 5 459 50 1200 50 1200
structaref 5 156 5 201 50 1809 50 1857
structaset 5 201 5 250 50 396 50 503
throw 5 1088 5 1286 50 1418 50 1563

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) 1543422 1345935 203 2639 0 0% 0 0 75.218018
chunky-png (click) 319644 302346 79 1373 1 0% 0 0 38.715686
erubi-rails (click) 1364690 1199062 269 3681 22 0% 0 0 98.79669
hexapdf (click) 1516841 1371662 593 15664 44 0% 0 0 437.585931
liquid-c (click) 556073 478540 114 2228 5 0% 0 0 60.025139
liquid-compile (click) 479002 398167 146 2725 2 0% 0 0 78.621655
liquid-render (click) 663282 546331 131 2946 8 0% 0 0 80.10756
mail (click) 865378 777324 345 7725 40 0% 0 0 215.068301
psych-load (click) 286879 272013 61 828 2 0% 0 0 23.553638
railsbench (click) 3343592 3060976 1591 19731 97 0% 0 0 552.286553
rubocop (click) 5755905 4968070 3002 56844 125 0% 6 0 1660.71464
ruby-lsp (click) 958950 887508 343 6727 45 0% 1 0 181.398965
sequel (click) 502357 430652 11 119 0 0% 0 0 3.966264
shipit (click) 7454806 6188544 3440 55649 174 0% 1 0 1886.026154
addressable-equality (click) 315973 299722 44 1381 0 0% 0 0 33.758089
addressable-getters (click) 274978 249699 26 863 0 0% 0 0 21.24089
addressable-join (click) 282419 219722 24 941 0 0% 0 0 23.607465
addressable-merge (click) 281412 253336 27 896 0 0% 0 0 22.552243
addressable-new (click) 252983 222606 21 579 0 0% 0 0 14.427772
addressable-normalize (click) 311386 294764 43 1328 0 0% 0 0 32.273033
addressable-parse (click) 280566 238654 26 894 0 0% 0 0 22.274047
addressable-setters (click) 252353 223839 20 582 0 0% 0 0 14.816119
addressable-to-s (click) 275979 241573 26 853 0 0% 0 0 20.883422
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.851036
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.61945
erubi (click) 234958 232998 6 134 0 0% 0 0 3.953885
etanni (click) 32832 35642 8 113 0 0% 0 0 3.455237
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.787117
fluentd (click) 482727 415698 7 115 0 0% 0 0 3.821285
graphql (click) 410039 369406 73 1921 19 0% 0 0 53.552595
graphql-native (click) 354516 319575 39 532 0 0% 0 0 13.892742
knucleotide (click) 9997 11103 7 113 0 0% 0 0 7.908943
lee (click) 312325 289597 49 1097 0 0% 0 0 31.593929
matmul (click) 11103 4709 8 136 0 0% 0 0 4.285096
nbody (click) 14448 21176 6 251 0 0% 0 0 6.023943
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.232003
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 111.424468
protoboeuf (click) 169555 177006 12 2829 0 0% 0 0 72.589831
protoboeuf-encode (click) 242967 283659 14 1815 0 0% 0 0 44.441713
rack (click) 280037 247884 35 580 0 0% 0 0 15.271617
ruby-json (click) 20323 18532 8 206 0 0% 0 0 5.65636
rubyboy (click) 703544 629053 154 6862 42 0% 0 0 167.84708
rubykon (click) 146441 162602 137 2076 3 0% 0 0 56.307593
sudoku (click) 51704 65882 7 870 0 0% 0 0 22.81559
tinygql (click) 287628 273179 59 1031 5 0% 0 0 27.540276
30k_ifelse (click) 6222887 5052688 9260 75477 0 0% 0 0 1931.00296
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 495.673369
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.090064
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.523888
fib (click) 2659 2995 3 30 0 0% 0 0 1.149236
getivar (click) 3789 6778 3 79 0 0% 0 0 1.938265
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.325589
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.829611
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.93795
object-new (click) 2406 2818 2 36 0 0% 0 0 1.056036
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.128642
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.864892
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.844411
send_cfunc_block (click) 14429 12201 5 192 0 0% 0 0 4.150751
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.483654
setivar (click) 2783 3726 3 46 0 0% 0 0 1.266341
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.431871
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.711954
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.478455
structaref (click) 4407 9095 3 88 0 0% 0 0 2.358895
structaset (click) 3926 5614 3 70 0 0% 0 0 1.773594
throw (click) 5953 4624 5 53 0 0% 0 0 1.795016

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.