Ruby Benchmarks

Details for Benchmarks at 2025-10-22 01:03:20 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 88.8% faster than CRuby 3.5.0dev
  • 1.4% slower than YJIT 3.4.7
On railsbench it is
  • 103.5% faster than CRuby 3.5.0dev
  • 4.1% faster than YJIT 3.4.7
x86_64 runtime: 6 hours, 56 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 86 50 189 50 222
chunky-png 5 31 5 32 50 33 50 28
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 422 5 383 50 625 50 503
liquid-compile 5 417 5 461 50 584 50 679
liquid-render 5 173 5 169 50 412 50 370
lobsters 5 20 5 20 50 10 50 10
mail 5 195 5 182 50 253 50 210
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 153 5 157 50 248 50 242
ruby-lsp 5 142 5 146 50 240 50 241
sequel 5 420 5 418 50 589 50 573
shipit 5 10 5 10 50 10 50 10
binarytrees 5 82 5 80 50 136 50 128
blurhash 5 83 5 87 50 143 50 144
erubi 5 136 5 131 50 136 50 131
etanni 5 98 5 67 50 71 50 30
fannkuchredux 5 54 5 57 50 102 50 99
fluentd 5 56 5 56 50 27 50 28
graphql 5 370 5 452 50 569 50 893
graphql-native 5 58 5 83 50 22 50 63
lee 5 23 5 23 50 10 50 10
matmul 5 51 5 54 50 94 50 92
nbody 5 247 5 301 50 704 50 692
nqueens 5 115 5 125 50 556 50 551
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 173 50 707 50 658
protoboeuf-encode 5 195 5 194 50 838 50 794
rack 5 436 5 444 50 711 50 680
ruby-json 5 82 5 80 50 47 50 49
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 48 50 157 50 149
tinygql 5 41 5 42 50 40 50 47
30k_ifelse 5 28 5 27 50 183 50 184
30k_methods 5 38 5 37 50 476 50 474
attr_accessor 5 158 5 195 50 1823 50 1902
cfunc_itself 5 347 5 347 50 1255 50 1258
fib 5 124 5 142 50 938 50 937
getivar 5 217 5 304 50 2309 50 2412
keyword_args 5 100 5 106 50 1240 50 1242
loops-times 5 23 5 24 50 62 50 57
object-new 5 268 5 352 50 299 50 578
respond_to 5 139 5 136 50 3890 50 3893
ruby-xor 5 236 5 239 50 1310 50 1272
send_bmethod 5 116 5 119 50 5538 50 5543
send_cfunc_block 5 106 5 96 50 360 50 333
send_rubyfunc_block 5 250 5 240 50 6916 50 6931
setivar 5 360 5 353 50 4925 50 4923
setivar_object 5 339 5 328 50 742 50 543
setivar_young 5 342 5 329 50 795 50 567
str_concat 5 390 5 403 50 1200 50 1076
throw 5 1089 5 1144 50 1407 50 1552

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) 1548641 1330402 205 2579 0 0% 0 0 77.843249
chunky-png (click) 316655 291787 74 1322 1 0% 0 0 37.200569
erubi-rails (click) 1960541 1727585 261 3618 22 0% 0 0 98.703649
hexapdf (click) 1524085 1340627 593 15682 44 0% 0 0 437.437248
liquid-c (click) 555437 486943 114 2228 5 0% 0 0 59.588481
liquid-compile (click) 480036 440713 146 2734 2 0% 0 0 81.319581
liquid-render (click) 659869 616723 131 2946 8 0% 0 0 79.171139
lobsters (click) 8445526 7120008 3098 62182 118 0% 0 0 2104.047821
mail (click) 864009 743979 342 7696 40 0% 0 0 212.788453
psych-load (click) 286585 223503 61 830 2 0% 0 0 23.689325
railsbench (click) 3351560 2839354 1605 19540 47 0% 0 0 545.800555
rubocop (click) 5759295 4989150 3001 56845 125 0% 6 0 1670.544034
ruby-lsp (click) 962785 833788 347 6781 44 0% 1 0 183.041768
sequel (click) 502521 398408 11 119 0 0% 0 0 3.819701
shipit (click) 7732124 6469906 3343 53392 181 0% 1 0 1819.133183
binarytrees (click) 7273 6911 6 64 0 0% 0 0 2.581727
blurhash (click) 52295 51444 27 603 0 0% 0 0 17.779697
erubi (click) 245369 236947 5 125 0 0% 0 0 3.792155
etanni (click) 32930 35718 8 114 0 0% 0 0 3.610715
fannkuchredux (click) 24746 40953 3 399 0 0% 0 0 10.757595
fluentd (click) 490959 458952 7 115 0 0% 0 0 3.732988
graphql (click) 409762 369385 73 1920 19 0% 0 0 53.610846
graphql-native (click) 354216 303241 39 532 0 0% 0 0 13.880881
lee (click) 317215 312581 49 1070 0 0% 0 0 31.202678
matmul (click) 11125 4603 8 132 0 0% 0 0 4.196635
nbody (click) 13890 20235 6 238 0 0% 0 0 5.877405
nqueens (click) 22652 36960 5 387 0 0% 0 0 10.063344
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 110.694524
protoboeuf (click) 170160 177773 12 2836 0 0% 0 0 72.958896
protoboeuf-encode (click) 243046 283791 14 1815 0 0% 0 0 44.478128
rack (click) 280745 248837 35 580 0 0% 0 0 15.131275
ruby-json (click) 19791 17761 8 204 0 0% 0 0 5.608142
rubyboy (click) 702321 579007 154 6860 42 0% 0 0 167.315143
rubykon (click) 145449 177646 137 2062 3 0% 0 0 55.842291
sudoku (click) 52157 66291 7 871 0 0% 0 0 23.142245
tinygql (click) 300226 263168 59 1031 5 0% 0 0 26.995352
30k_ifelse (click) 6219958 5057296 9259 75432 0 0% 0 0 1919.546989
30k_methods (click) 2234566 1592952 5778 19357 0 0% 0 0 474.039857
attr_accessor (click) 4372 7952 3 78 0 0% 0 0 2.136533
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.54321
fib (click) 2659 2995 3 30 0 0% 0 0 1.136006
getivar (click) 3812 6802 3 78 0 0% 0 0 1.988864
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.841396
loops-times (click) 6972 8013 5 93 0 0% 0 0 2.781015
object-new (click) 2406 2818 2 36 0 0% 0 0 1.074173
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.142229
ruby-xor (click) 5876 8690 4 100 0 0% 0 0 2.717378
send_bmethod (click) 5238 4968 6 71 0 0% 0 0 1.752082
send_cfunc_block (click) 14669 12471 5 195 0 0% 0 0 4.271199
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.489242
setivar (click) 2783 3726 3 46 0 0% 0 0 1.272218
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.441394
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.772469
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.474837
throw (click) 5953 4624 5 53 0 0% 0 0 1.831498

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.