Ruby Benchmarks

Details for Benchmarks at 2025-10-03 01:03:56 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 92.3% faster than CRuby 3.5.0dev
  • 6.1% faster than YJIT 3.3.6
On railsbench it is
  • 103.6% faster than CRuby 3.5.0dev
  • 5.9% faster than YJIT 3.3.6
x86_64 runtime: 6 hours, 46 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 82 5 85 50 176 50 219
chunky-png 5 31 5 32 50 15 50 28
erubi-rails 5 16 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 404 5 397 50 598 50 525
liquid-compile 5 416 5 470 50 547 50 716
liquid-render 5 171 5 166 50 414 50 381
lobsters 5 20 5 20 50 10 50 10
mail 5 195 5 170 50 236 50 213
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 140 5 141 50 208 50 217
ruby-lsp 5 140 5 145 50 222 50 241
sequel 5 428 5 420 50 573 50 590
shipit 5 10 5 10 50 10 50 10
binarytrees 5 84 5 78 50 142 50 128
blurhash 5 82 5 88 50 127 50 145
erubi 5 126 5 137 50 100 50 138
etanni 5 90 5 65 50 53 50 31
fannkuchredux 5 52 5 57 50 97 50 101
fluentd 5 62 5 61 50 23 50 29
graphql 5 339 5 448 50 461 50 917
graphql-native 5 51 5 81 50 14 50 62
lee 5 23 5 22 50 10 50 10
matmul 5 50 5 50 50 87 50 90
nbody 5 248 5 256 50 578 50 699
nqueens 5 120 5 128 50 74 50 554
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 178 50 620 50 656
protoboeuf-encode 5 178 5 209 50 327 50 778
rack 5 419 5 440 50 644 50 690
ruby-json 5 83 5 80 50 50 50 47
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 20 5 20 50 10 50 10
sudoku 5 48 5 50 50 162 50 149
tinygql 5 40 5 41 50 42 50 47
30k_ifelse 5 28 5 27 50 214 50 185
30k_methods 5 39 5 37 50 480 50 474
attr_accessor 5 159 5 199 50 1727 50 1913
cfunc_itself 5 338 5 330 50 1136 50 1255
fib 5 126 5 122 50 910 50 935
getivar 5 211 5 287 50 2261 50 2397
keyword_args 5 103 5 106 50 1031 50 1242
loops-times 5 24 5 23 50 48 50 57
object-new 5 318 5 343 50 406 50 570
respond_to 5 132 5 137 50 3248 50 3901
ruby-xor 5 244 5 252 50 796 50 1268
setivar 5 360 5 388 50 3058 50 4947
setivar_object 5 358 5 357 50 686 50 555
setivar_young 5 367 5 357 50 699 50 582
str_concat 5 389 5 429 50 977 50 1078
throw 5 1260 5 1124 50 1749 50 1553

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) 1537379 1307893 205 2579 0 0% 0 0 78.3813
chunky-png (click) 315858 306944 74 1322 1 0% 0 0 38.225916
erubi-rails (click) 1929407 1707656 261 3712 22 0% 0 0 101.152025
hexapdf (click) 1513784 1368230 593 15684 43 0% 0 0 450.299803
liquid-c (click) 541366 461663 114 2228 5 0% 0 0 60.385648
liquid-compile (click) 466905 424408 146 2750 2 0% 0 0 81.528785
liquid-render (click) 647917 536383 131 2946 8 0% 0 0 81.425165
lobsters (click) 8422142 6925871 3099 62358 118 0% 0 0 2102.679506
mail (click) 856833 791401 342 7696 40 0% 0 0 213.876527
psych-load (click) 283235 251014 61 830 2 0% 0 0 24.277444
railsbench (click) 3327384 2824990 1605 19583 47 0% 0 0 558.022845
rubocop (click) 6110675 5306297 3012 63540 133 0% 6 0 1831.277925
ruby-lsp (click) 956073 824621 347 6795 44 0% 1 0 184.190583
sequel (click) 494880 429282 11 119 0 0% 0 0 3.856358
shipit (click) 7674111 6497923 3343 53107 181 0% 1 0 1770.356127
binarytrees (click) 7273 6911 6 64 0 0% 0 0 2.642809
blurhash (click) 52295 51444 27 603 0 0% 0 0 18.034029
erubi (click) 248938 190939 5 125 0 0% 0 0 3.802479
etanni (click) 32930 35718 8 114 0 0% 0 0 3.707633
fannkuchredux (click) 24746 40953 3 399 0 0% 0 0 10.880199
fluentd (click) 467305 404784 7 115 0 0% 0 0 3.758862
graphql (click) 391008 355519 73 1920 18 0% 0 0 54.207707
graphql-native (click) 346737 285070 39 532 0 0% 0 0 13.978074
lee (click) 299335 250682 49 1070 0 0% 0 0 31.530574
matmul (click) 11125 4603 8 132 0 0% 0 0 4.258832
nbody (click) 13890 20235 6 238 0 0% 0 0 5.868324
nqueens (click) 22652 36960 5 387 0 0% 0 0 10.258527
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 113.010986
protoboeuf (click) 170160 177773 12 2836 0 0% 0 0 73.168406
protoboeuf-encode (click) 243046 283791 14 1815 0 0% 0 0 45.010277
rack (click) 274011 223331 35 580 0 0% 0 0 15.340358
ruby-json (click) 19791 17761 8 204 0 0% 0 0 5.600972
rubyboy (click) 678178 608947 154 6858 42 0% 0 0 168.056993
rubykon (click) 148508 140471 137 2101 3 0% 0 0 57.411761
sudoku (click) 52157 66291 7 871 0 0% 0 0 23.30857
tinygql (click) 300726 254834 59 1031 5 0% 0 0 27.168508
30k_ifelse (click) 6219958 5057296 9259 75432 0 0% 0 0 1935.861154
30k_methods (click) 2234566 1592952 5778 19357 0 0% 0 0 481.047603
attr_accessor (click) 4372 7952 3 78 0 0% 0 0 2.146737
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.547443
fib (click) 2659 2995 3 30 0 0% 0 0 1.139306
getivar (click) 3812 6802 3 78 0 0% 0 0 1.971304
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.861259
loops-times (click) 6972 8013 5 93 0 0% 0 0 2.833672
object-new (click) 2406 2818 2 36 0 0% 0 0 1.02579
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.15141
ruby-xor (click) 5876 8690 4 100 0 0% 0 0 2.782321
setivar (click) 2783 3726 3 46 0 0% 0 0 1.305704
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.471204
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.915334
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.535844
throw (click) 5953 4624 5 53 0 0% 0 0 1.841732

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.