Ruby Benchmarks

Details for Benchmarks at 2025-10-07 01:03:46 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 91.4% faster than CRuby 3.5.0dev
  • 5.4% faster than YJIT 3.3.6
On railsbench it is
  • 105.0% faster than CRuby 3.5.0dev
  • 5.9% faster than YJIT 3.3.6
x86_64 runtime: 6 hours, 44 minutes
aarch64 runtime: 5 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.3.6 warmups CRuby 3.3.6 iters CRuby 3.5.0dev warmups CRuby 3.5.0dev iters YJIT 3.3.6 warmups YJIT 3.3.6 iters YJIT 3.5.0dev warmups YJIT 3.5.0dev iters
activerecord 5 83 5 86 50 175 50 221
chunky-png 5 31 5 32 50 14 50 28
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 407 5 400 50 596 50 522
liquid-compile 5 407 5 474 50 545 50 717
liquid-render 5 172 5 167 50 416 50 384
lobsters 5 20 5 20 50 10 50 10
mail 5 195 5 177 50 251 50 205
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 141 5 141 50 207 50 219
ruby-lsp 5 141 5 145 50 225 50 243
sequel 5 421 5 419 50 564 50 577
shipit 5 10 5 10 50 10 50 10
binarytrees 5 84 5 78 50 142 50 128
blurhash 5 81 5 86 50 127 50 145
erubi 5 124 5 138 50 98 50 136
etanni 5 90 5 63 50 54 50 32
fannkuchredux 5 52 5 57 50 98 50 100
fluentd 5 62 5 61 50 24 50 30
graphql 5 334 5 455 50 464 50 921
graphql-native 5 51 5 83 50 16 50 59
lee 5 23 5 22 50 10 50 10
matmul 5 50 5 50 50 87 50 90
nbody 5 249 5 255 50 577 50 702
nqueens 5 120 5 125 50 74 50 563
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 179 50 621 50 670
protoboeuf-encode 5 179 5 205 50 328 50 787
rack 5 421 5 446 50 645 50 694
ruby-json 5 83 5 79 50 50 50 46
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 21 50 10 50 10
sudoku 5 47 5 50 50 163 50 158
tinygql 5 40 5 42 50 38 50 46
30k_ifelse 5 28 5 27 50 215 50 184
30k_methods 5 38 5 37 50 476 50 475
attr_accessor 5 160 5 211 50 1725 50 1929
cfunc_itself 5 338 5 349 50 1137 50 1257
fib 5 126 5 140 50 912 50 936
getivar 5 212 5 284 50 2258 50 2392
keyword_args 5 103 5 104 50 1033 50 1242
loops-times 5 24 5 23 50 48 50 57
object-new 5 318 5 347 50 407 50 584
respond_to 5 132 5 136 50 3254 50 3898
ruby-xor 5 244 5 244 50 796 50 1264
setivar 5 360 5 383 50 3042 50 4962
setivar_object 5 358 5 356 50 684 50 554
setivar_young 5 367 5 359 50 698 50 581
str_concat 5 392 5 429 50 974 50 1156
throw 5 1267 5 1120 50 1741 50 1557

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) 1538412 1325111 205 2579 0 0% 0 0 78.569285
chunky-png (click) 309538 299642 74 1322 1 0% 0 0 38.099448
erubi-rails (click) 1943118 1657245 261 3769 22 0% 0 0 104.349633
hexapdf (click) 1515374 1386561 594 15701 43 0% 0 0 447.844688
liquid-c (click) 539666 509238 114 2228 5 0% 0 0 60.257323
liquid-compile (click) 456596 421906 146 2721 2 0% 0 0 79.960426
liquid-render (click) 647568 568672 131 2946 8 0% 0 0 80.805835
lobsters (click) 8441573 7165112 3099 62510 118 0% 0 0 2125.60285
mail (click) 856833 840521 342 7696 40 0% 0 0 212.403499
psych-load (click) 274763 258130 61 830 2 0% 0 0 23.92797
railsbench (click) 3323474 2927235 1605 19506 40 0% 0 0 557.313709
rubocop (click) 6112055 5373044 3012 63547 133 0% 6 0 1833.898366
ruby-lsp (click) 955262 832314 347 6795 44 0% 1 0 182.554654
sequel (click) 494880 429250 11 119 0 0% 0 0 3.885392
shipit (click) 7584669 6354486 3262 51907 180 0% 0 0 1724.083876
binarytrees (click) 7273 6911 6 64 0 0% 0 0 2.670121
blurhash (click) 52295 51444 27 603 0 0% 0 0 17.962006
erubi (click) 247501 197658 5 125 0 0% 0 0 3.864299
etanni (click) 32930 35718 8 114 0 0% 0 0 3.662003
fannkuchredux (click) 24746 40953 3 399 0 0% 0 0 10.854429
fluentd (click) 467596 454005 7 115 0 0% 0 0 3.790696
graphql (click) 390715 363415 73 1920 18 0% 0 0 54.619662
graphql-native (click) 346737 285070 39 532 0 0% 0 0 14.040265
lee (click) 309677 278363 49 1070 0 0% 0 0 31.183569
matmul (click) 11125 4603 8 132 0 0% 0 0 4.275842
nbody (click) 13890 20235 6 238 0 0% 0 0 5.909713
nqueens (click) 22652 36960 5 387 0 0% 0 0 10.191972
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 112.404491
protoboeuf (click) 170160 177773 12 2836 0 0% 0 0 73.048739
protoboeuf-encode (click) 243046 283791 14 1815 0 0% 0 0 44.930878
rack (click) 274259 231819 35 580 0 0% 0 0 15.083924
ruby-json (click) 19791 17761 8 204 0 0% 0 0 5.671644
rubyboy (click) 688385 571125 154 6860 42 0% 0 0 169.23278
rubykon (click) 148508 140471 137 2101 3 0% 0 0 57.625995
sudoku (click) 52157 66291 7 871 0 0% 0 0 23.308495
tinygql (click) 299769 278638 59 1031 5 0% 0 0 27.219127
30k_ifelse (click) 6219958 5057296 9259 75432 0 0% 0 0 1944.257968
30k_methods (click) 2234566 1592952 5778 19357 0 0% 0 0 480.081664
attr_accessor (click) 4372 7952 3 78 0 0% 0 0 2.1862
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.560604
fib (click) 2659 2995 3 30 0 0% 0 0 1.104641
getivar (click) 3812 6802 3 78 0 0% 0 0 1.985649
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.844251
loops-times (click) 6972 8013 5 93 0 0% 0 0 2.843594
object-new (click) 2406 2818 2 36 0 0% 0 0 1.107807
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.173037
ruby-xor (click) 5876 8690 4 100 0 0% 0 0 2.730368
setivar (click) 2783 3726 3 46 0 0% 0 0 1.312318
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.417214
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.736583
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.484717
throw (click) 5953 4624 5 53 0 0% 0 0 1.850449

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.