Ruby Benchmarks

Details for Benchmarks at 2025-10-02 01:03:49 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 93.0% faster than CRuby 3.5.0dev
  • 5.3% faster than YJIT 3.3.6
On railsbench it is
  • 108.6% faster than CRuby 3.5.0dev
  • 6.4% faster than YJIT 3.3.6
x86_64 runtime: 6 hours, 45 minutes
aarch64 runtime: 5 hours, 50 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 84 5 87 50 183 50 221
chunky-png 5 31 5 32 50 14 50 29
erubi-rails 5 16 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 421 5 397 50 601 50 536
liquid-compile 5 412 5 463 50 550 50 706
liquid-render 5 171 5 168 50 417 50 370
lobsters 5 20 5 20 50 10 50 10
mail 5 188 5 171 50 236 50 225
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 137 5 142 50 214 50 220
ruby-lsp 5 147 5 144 50 233 50 240
sequel 5 425 5 419 50 571 50 579
shipit 5 10 5 10 50 10 50 10
binarytrees 5 84 5 80 50 142 50 128
blurhash 5 82 5 87 50 127 50 145
erubi 5 125 5 138 50 99 50 135
etanni 5 90 5 67 50 53 50 32
fannkuchredux 5 52 5 57 50 98 50 100
fluentd 5 62 5 59 50 23 50 27
graphql 5 335 5 460 50 443 50 913
graphql-native 5 52 5 81 50 15 50 64
lee 5 22 5 22 50 10 50 10
matmul 5 50 5 51 50 87 50 92
nbody 5 248 5 242 50 578 50 702
nqueens 5 120 5 130 50 74 50 550
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 179 50 621 50 653
protoboeuf-encode 5 179 5 205 50 326 50 782
rack 5 423 5 444 50 645 50 692
ruby-json 5 84 5 81 50 50 50 49
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 51 50 163 50 148
tinygql 5 41 5 42 50 43 50 47
30k_ifelse 5 28 5 27 50 215 50 184
30k_methods 5 39 5 37 50 479 50 468
attr_accessor 5 159 5 209 50 1727 50 1928
cfunc_itself 5 337 5 348 50 1137 50 1258
fib 5 127 5 140 50 912 50 938
getivar 5 212 5 341 50 2259 50 2437
keyword_args 5 104 5 108 50 1033 50 1243
loops-times 5 24 5 24 50 48 50 56
object-new 5 318 5 346 50 406 50 584
respond_to 5 133 5 135 50 3255 50 3901
ruby-xor 5 243 5 250 50 797 50 1268
setivar 5 361 5 393 50 3088 50 4972
setivar_object 5 358 5 360 50 683 50 549
setivar_young 5 371 5 361 50 698 50 583
str_concat 5 395 5 448 50 981 50 1141
throw 5 1265 5 1149 50 1725 50 1535

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) 1538540 1300747 205 2577 0 0% 0 0 78.839564
chunky-png (click) 318597 252178 74 1322 1 0% 0 0 37.358765
erubi-rails (click) 1942941 1695803 261 3743 22 0% 0 0 102.553596
hexapdf (click) 1513398 1367881 593 15679 43 0% 0 0 440.60695
liquid-c (click) 540926 420172 114 2228 5 0% 0 0 60.315905
liquid-compile (click) 462185 419448 146 2691 2 0% 0 0 79.357971
liquid-render (click) 649311 586988 131 2946 8 0% 0 0 80.534955
lobsters (click) 8550130 7208448 3120 63648 118 0% 0 0 2103.306689
mail (click) 856947 824182 342 7696 40 0% 0 0 215.49554
psych-load (click) 282087 241645 61 830 2 0% 0 0 24.615105
railsbench (click) 3323933 2837958 1605 19558 47 0% 0 0 551.43056
rubocop (click) 6125125 5304962 3014 63668 156 0% 6 0 1827.022706
ruby-lsp (click) 956523 866251 347 6802 44 0% 1 0 183.770876
sequel (click) 494058 428541 11 119 0 0% 0 0 3.851419
shipit (click) 7622100 6479458 3265 52354 182 0% 0 0 1663.807891
binarytrees (click) 7273 6911 6 64 0 0% 0 0 2.623043
blurhash (click) 52295 51444 27 603 0 0% 0 0 17.735582
erubi (click) 247501 189466 5 125 0 0% 0 0 3.797203
etanni (click) 32930 35718 8 114 0 0% 0 0 3.594186
fannkuchredux (click) 24746 40953 3 399 0 0% 0 0 10.864297
fluentd (click) 467305 396524 7 115 0 0% 0 0 3.787563
graphql (click) 401943 359099 73 1920 19 0% 0 0 54.248642
graphql-native (click) 345063 299871 39 532 0 0% 0 0 14.084475
lee (click) 310638 287327 49 1070 0 0% 0 0 31.428979
matmul (click) 11125 4603 8 132 0 0% 0 0 4.227277
nbody (click) 13890 20235 6 238 0 0% 0 0 5.853147
nqueens (click) 22652 36960 5 387 0 0% 0 0 10.277814
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 111.283601
protoboeuf (click) 170160 177773 12 2836 0 0% 0 0 72.371215
protoboeuf-encode (click) 243046 283791 14 1815 0 0% 0 0 44.533782
rack (click) 274304 231819 35 580 0 0% 0 0 15.239331
ruby-json (click) 19791 17761 8 204 0 0% 0 0 5.595417
rubyboy (click) 689760 621327 154 6864 42 0% 0 0 167.479746
rubykon (click) 146229 162118 137 2070 3 0% 0 0 56.385324
sudoku (click) 52157 66291 7 871 0 0% 0 0 23.168371
tinygql (click) 300433 254518 59 1031 5 0% 0 0 27.252655
30k_ifelse (click) 6219958 5057296 9259 75432 0 0% 0 0 1934.483213
30k_methods (click) 2234566 1592952 5778 19357 0 0% 0 0 478.647708
attr_accessor (click) 4372 7952 3 78 0 0% 0 0 2.099799
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.552135
fib (click) 2659 2995 3 30 0 0% 0 0 1.153574
getivar (click) 3812 6802 3 78 0 0% 0 0 1.957733
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.7973
loops-times (click) 6972 8013 5 93 0 0% 0 0 2.798579
object-new (click) 2406 2818 2 36 0 0% 0 0 1.104727
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.146852
ruby-xor (click) 5876 8690 4 100 0 0% 0 0 2.712916
setivar (click) 2783 3726 3 46 0 0% 0 0 1.286854
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.415554
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.752456
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.47619
throw (click) 5953 4624 5 53 0 0% 0 0 1.855635

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.