Ruby Benchmarks

Details for Benchmarks at 2025-11-02 00:42:22 UTC

YJIT metrics from the ruby-bench suite using Ruby 48c7f349f6.

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 94.8% faster than CRuby 3.5.0dev
  • 1.7% slower than YJIT 3.4.7
On railsbench it is
  • 103.4% faster than CRuby 3.5.0dev
  • 2.9% faster than YJIT 3.4.7
x86_64 runtime: 7 hours, 9 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 3.5.0dev warmups CRuby 3.5.0dev iters YJIT 3.4.7 warmups YJIT 3.4.7 iters YJIT 3.5.0dev warmups YJIT 3.5.0dev iters
activerecord 5 84 5 87 50 192 50 221
chunky-png 5 31 5 31 50 33 50 27
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 419 5 388 50 625 50 533
liquid-compile 5 418 5 472 50 554 50 677
liquid-render 5 173 5 159 50 432 50 357
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 130 50 254 50 204
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 153 5 156 50 248 50 248
ruby-lsp 5 145 5 146 50 226 50 243
sequel 5 420 5 413 50 605 50 570
shipit 5 10 5 10 50 10 50 10
binarytrees 5 82 5 80 50 136 50 127
blurhash 5 83 5 88 50 143 50 144
erubi 5 134 5 134 50 135 50 126
etanni 5 97 5 66 50 72 50 28
fannkuchredux 5 55 5 56 50 102 50 101
fluentd 5 56 5 56 50 27 50 28
graphql 5 370 5 445 50 573 50 911
graphql-native 5 59 5 80 50 20 50 59
knucleotide 5 163 5 160 50 116 50 114
lee 5 23 5 22 50 10 50 10
matmul 5 51 5 52 50 95 50 89
nbody 5 247 5 289 50 676 50 699
nqueens 5 116 5 123 50 556 50 556
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 177 50 707 50 641
protoboeuf-encode 5 197 5 191 50 831 50 780
rack 5 435 5 430 50 721 50 676
ruby-json 5 81 5 94 50 47 50 66
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 20 50 10 50 10
sudoku 5 48 5 48 50 157 50 150
tinygql 5 42 5 41 50 35 50 47
30k_ifelse 5 28 5 27 50 173 50 182
30k_methods 5 38 5 37 50 458 50 446
attr_accessor 5 157 5 204 50 1836 50 1932
cfunc_itself 5 347 5 361 50 1255 50 1257
fib 5 124 5 138 50 939 50 939
getivar 5 216 5 300 50 2309 50 2411
keyword_args 5 100 5 104 50 1240 50 1242
loops-times 5 23 5 24 50 64 50 57
object-new 5 268 5 357 50 297 50 581
respond_to 5 139 5 136 50 3890 50 3898
ruby-xor 5 237 5 228 50 1314 50 1277
send_bmethod 5 117 5 118 50 5539 50 5543
send_cfunc_block 5 106 5 105 50 353 50 339
send_rubyfunc_block 5 249 5 230 50 6923 50 6929
setivar 5 360 5 366 50 4926 50 4944
setivar_object 5 341 5 345 50 750 50 546
setivar_young 5 341 5 345 50 794 50 565
str_concat 5 390 5 419 50 1198 50 999
structaref 5 156 5 201 50 1811 50 1888
throw 5 1090 5 1104 50 1418 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) 1550354 1290783 205 2579 0 0% 0 0 72.980306
chunky-png (click) 313644 256296 74 1322 1 0% 0 0 37.617078
erubi-rails (click) 1971216 1707206 262 3731 22 0% 0 0 100.66209
hexapdf (click) 1527513 1336322 594 15703 44 0% 0 0 439.803101
liquid-c (click) 555792 495374 114 2228 5 0% 0 0 60.905498
liquid-compile (click) 466860 376904 146 2674 2 0% 0 0 77.132035
liquid-render (click) 662150 627206 131 2946 8 0% 0 0 78.901334
lobsters (click) 8446958 7129520 3098 62229 118 0% 0 0 2114.651347
mail (click) 864365 768846 342 7696 40 0% 0 0 212.161042
psych-load (click) 288640 233869 61 832 2 0% 0 0 23.964268
railsbench (click) 3353317 2905187 1605 19589 47 0% 0 0 584.806285
rubocop (click) 5759390 5070830 3001 56847 125 0% 6 0 1657.22586
ruby-lsp (click) 963525 850842 347 6782 44 0% 1 0 182.389769
sequel (click) 502881 439671 11 119 0 0% 0 0 3.858726
shipit (click) 7584647 6381639 3261 51644 180 0% 0 0 1702.649695
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.835448
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.850421
erubi (click) 246934 205998 6 134 0 0% 0 0 3.902425
etanni (click) 32930 35718 8 114 0 0% 0 0 3.612039
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.940969
fluentd (click) 481993 465337 7 115 0 0% 0 0 3.735373
graphql (click) 410111 353291 73 1921 19 0% 0 0 53.634723
graphql-native (click) 354571 303480 39 532 0 0% 0 0 13.825904
knucleotide (click) 9997 11103 7 113 0 0% 0 0 7.202615
lee (click) 318258 255980 49 1097 0 0% 0 0 31.880373
matmul (click) 11103 4709 8 136 0 0% 0 0 4.24659
nbody (click) 14448 21176 6 251 0 0% 0 0 6.193707
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.283972
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 111.096201
protoboeuf (click) 170129 177717 12 2837 0 0% 0 0 72.825551
protoboeuf-encode (click) 243065 283735 14 1816 0 0% 0 0 44.469591
rack (click) 281146 265518 35 580 0 0% 0 0 15.123023
ruby-json (click) 19868 17928 8 206 0 0% 0 0 5.651412
rubyboy (click) 703567 662488 154 6868 42 0% 0 0 167.310878
rubykon (click) 146229 162118 137 2070 3 0% 0 0 55.975434
sudoku (click) 52278 66593 7 878 0 0% 0 0 23.069121
tinygql (click) 301531 247216 59 1031 5 0% 0 0 26.891435
30k_ifelse (click) 6222887 5052688 9260 75477 0 0% 0 0 1936.271156
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 490.956045
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.14626
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.521914
fib (click) 2659 2995 3 30 0 0% 0 0 1.145301
getivar (click) 3789 6778 3 79 0 0% 0 0 1.964559
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.833086
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.913347
object-new (click) 2406 2818 2 36 0 0% 0 0 1.106037
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.126053
ruby-xor (click) 6026 856 4 105 0 0% 0 0 2.836483
send_bmethod (click) 5238 4968 6 71 0 0% 0 0 1.76989
send_cfunc_block (click) 14669 12471 5 195 0 0% 0 0 4.279459
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.492788
setivar (click) 2783 3726 3 46 0 0% 0 0 1.318498
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.477344
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.766755
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.505835
structaref (click) 4407 9095 3 88 0 0% 0 0 2.38254
throw (click) 5953 4624 5 53 0 0% 0 0 1.821133

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.