Ruby Benchmarks

Details for Benchmarks at 2026-01-07 00:43:27 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 95.8% faster than CRuby 4.1.0dev
  • 3.0% faster than YJIT 3.4.7
On railsbench it is
  • 114.2% faster than CRuby 4.1.0dev
  • 9.3% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 12 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 89 5 98 50 199 50 235
chunky-png 5 31 5 32 50 32 50 28
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 419 5 429 50 624 50 620
liquid-compile 5 420 5 468 50 585 50 721
liquid-render 5 166 5 173 50 432 50 438
mail 5 196 5 189 50 253 50 256
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 157 50 248 50 250
ruby-lsp 5 138 5 147 50 254 50 243
sequel 5 427 5 425 50 601 50 583
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 26 50 11 50 10
addressable-getters 5 164 5 168 50 183 50 190
addressable-join 5 73 5 77 50 66 50 68
addressable-merge 5 160 5 157 50 221 50 213
addressable-new 5 352 5 349 50 522 50 504
addressable-normalize 5 53 5 52 50 59 50 56
addressable-parse 5 102 5 104 50 104 50 106
addressable-setters 5 184 5 179 50 230 50 226
addressable-to-s 5 163 5 168 50 183 50 188
binarytrees 5 81 5 82 50 136 50 127
blurhash 5 83 5 87 50 143 50 144
erubi 5 137 5 149 50 137 50 154
etanni 5 97 5 71 50 71 50 36
fannkuchredux 5 54 5 57 50 102 50 104
fluentd 5 56 5 62 50 20 50 32
graphql 5 369 5 466 50 569 50 932
graphql-native 5 59 5 86 50 22 50 69
knucleotide 5 163 5 158 50 117 50 111
lee 5 23 5 24 50 10 50 10
matmul 5 51 5 54 50 94 50 97
nbody 5 247 5 278 50 676 50 703
nqueens 5 116 5 129 50 557 50 587
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 174 5 182 50 706 50 765
protoboeuf-encode 5 197 5 205 50 832 50 788
rack 5 438 5 451 50 705 50 701
ruby-json 5 83 5 98 50 50 50 70
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 162
tinygql 5 41 5 44 50 40 50 49
30k_ifelse 5 28 5 28 50 187 50 182
30k_methods 5 39 5 41 50 457 50 452
attr_accessor 5 157 5 199 50 1834 50 1925
cfunc_itself 5 348 5 351 50 1254 50 1259
fib 5 117 5 141 50 940 50 940
getivar 5 217 5 327 50 2314 50 2430
getivar-module 5 104 5 141 50 90 50 270
keyword_args 5 100 5 107 50 1239 50 1243
loops-times 5 23 5 26 50 64 50 60
object-new 5 268 5 365 50 298 50 681
respond_to 5 139 5 142 50 3888 50 3899
ruby-xor 5 237 5 246 50 1314 50 1287
send_bmethod 5 116 5 124 50 5538 50 4527
send_cfunc_block 5 106 5 106 50 353 50 337
send_rubyfunc_block 5 251 5 250 50 6924 50 6924
setivar 5 360 5 471 50 4924 50 5036
setivar_object 5 341 5 302 50 754 50 619
setivar_young 5 341 5 305 50 795 50 657
str_concat 5 390 5 458 50 1201 50 1181
structaref 5 156 5 202 50 1809 50 1894
structaset 5 202 5 264 50 394 50 511
throw 5 1088 5 1275 50 1413 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) 1543510 1305086 204 2651 0 0% 0 0 75.714378
chunky-png (click) 320436 328516 79 1373 1 0% 0 0 39.008577
erubi-rails (click) 1362656 1221692 269 3657 22 0% 0 0 98.190908
hexapdf (click) 1520974 1352712 594 15658 44 0% 0 0 436.818008
liquid-c (click) 553801 484472 114 2228 5 0% 0 0 59.586689
liquid-compile (click) 475838 443926 146 2700 2 0% 0 0 79.806542
liquid-render (click) 663282 554552 131 2946 8 0% 0 0 79.300392
mail (click) 862524 805849 345 7721 40 0% 0 0 214.299813
psych-load (click) 287669 265415 61 828 2 0% 0 0 24.235915
railsbench (click) 3317697 2915500 1577 19411 97 0% 0 0 543.778505
rubocop (click) 5759707 5021349 3002 56892 125 0% 6 0 1665.170234
ruby-lsp (click) 961910 849337 342 6703 44 0% 1 0 180.98016
sequel (click) 500075 444372 11 119 0 0% 0 0 3.976883
shipit (click) 7143796 6060542 3299 52150 170 0% 0 0 1703.99482
addressable-equality (click) 318861 269649 44 1381 1 0% 0 0 34.416876
addressable-getters (click) 279174 228788 26 863 0 0% 0 0 20.991593
addressable-join (click) 283861 262209 24 941 0 0% 0 0 23.805029
addressable-merge (click) 279559 276125 27 896 0 0% 0 0 22.120898
addressable-new (click) 257558 212023 21 569 0 0% 0 0 14.38212
addressable-normalize (click) 304290 286847 43 1347 1 0% 0 0 33.298317
addressable-parse (click) 274927 239795 26 880 0 0% 0 0 22.075957
addressable-setters (click) 257637 205925 20 584 0 0% 0 0 14.950218
addressable-to-s (click) 280056 246905 26 889 0 0% 0 0 21.623516
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.787925
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.18301
erubi (click) 247835 198529 6 134 0 0% 0 0 3.952009
etanni (click) 33287 36246 8 113 0 0% 0 0 3.517281
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.021095
fluentd (click) 472137 404914 7 115 0 0% 0 0 3.798165
graphql (click) 410135 361382 73 1921 19 0% 0 0 53.846446
graphql-native (click) 355746 329220 39 532 0 0% 0 0 14.054903
knucleotide (click) 9997 11103 7 113 0 0% 0 0 5.476937
lee (click) 314315 259592 49 1094 0 0% 0 0 31.247727
matmul (click) 11103 4709 8 136 0 0% 0 0 4.253082
nbody (click) 14448 21176 6 251 0 0% 0 0 6.156923
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.401898
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 111.467699
protoboeuf (click) 169555 177006 12 2829 0 0% 0 0 72.472394
protoboeuf-encode (click) 242967 283659 14 1815 0 0% 0 0 44.202119
rack (click) 277565 236492 35 585 0 0% 0 0 15.424164
ruby-json (click) 19868 17928 8 206 0 0% 0 0 5.720315
rubyboy (click) 704402 679744 154 6864 42 0% 0 0 166.660663
rubykon (click) 146441 162602 137 2076 3 0% 0 0 55.728257
sudoku (click) 51704 65882 7 870 0 0% 0 0 23.272361
tinygql (click) 300254 287625 59 1031 5 0% 0 0 27.360099
30k_ifelse (click) 6222887 5052688 9260 75477 0 0% 0 0 1938.229046
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 490.40869
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.082558
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.51021
fib (click) 2659 2995 3 30 0 0% 0 0 1.139859
getivar (click) 3789 6778 3 79 0 0% 0 0 1.915784
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.318988
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.807103
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.932153
object-new (click) 2406 2818 2 36 0 0% 0 0 1.109717
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.176251
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.870439
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.813994
send_cfunc_block (click) 14429 12201 5 192 0 0% 0 0 4.191759
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.470933
setivar (click) 2783 3726 3 46 0 0% 0 0 1.284246
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.434315
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.706559
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.440856
structaref (click) 4407 9095 3 88 0 0% 0 0 2.356048
structaset (click) 3926 5614 3 70 0 0% 0 0 1.747382
throw (click) 5953 4624 5 53 0 0% 0 0 1.911823

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.