Ruby Benchmarks

Details for Benchmarks at 2025-10-23 01:03:05 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 88.5% faster than CRuby 3.5.0dev
  • 1.3% slower than YJIT 3.4.7
On railsbench it is
  • 107.6% faster than CRuby 3.5.0dev
  • 5.2% 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 193 50 212
chunky-png 5 31 5 32 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 421 5 394 50 625 50 524
liquid-compile 5 413 5 469 50 582 50 711
liquid-render 5 171 5 171 50 435 50 359
lobsters 5 20 5 20 50 10 50 10
mail 5 195 5 183 50 252 50 212
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 247 50 248
ruby-lsp 5 138 5 145 50 228 50 241
sequel 5 427 5 412 50 600 50 566
shipit 5 10 5 10 50 10 50 10
binarytrees 5 82 5 80 50 136 50 127
blurhash 5 83 5 87 50 143 50 144
erubi 5 136 5 135 50 138 50 129
etanni 5 98 5 65 50 71 50 29
fannkuchredux 5 54 5 56 50 102 50 101
fluentd 5 56 5 58 50 20 50 28
graphql 5 370 5 456 50 571 50 904
graphql-native 5 58 5 81 50 22 50 60
lee 5 23 5 22 50 10 50 10
matmul 5 51 5 55 50 94 50 91
nbody 5 247 5 300 50 704 50 695
nqueens 5 116 5 125 50 556 50 562
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 181 50 705 50 670
protoboeuf-encode 5 197 5 188 50 837 50 800
rack 5 438 5 429 50 705 50 679
ruby-json 5 82 5 78 50 47 50 46
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 48 50 156 50 157
tinygql 5 41 5 42 50 39 50 47
30k_ifelse 5 28 5 27 50 184 50 183
30k_methods 5 39 5 37 50 473 50 471
attr_accessor 5 157 5 208 50 1825 50 1929
cfunc_itself 5 347 5 346 50 1254 50 1257
fib 5 124 5 142 50 937 50 936
getivar 5 216 5 300 50 2311 50 2422
keyword_args 5 99 5 105 50 1240 50 1242
loops-times 5 23 5 24 50 62 50 56
object-new 5 268 5 347 50 297 50 583
respond_to 5 139 5 135 50 3886 50 3872
ruby-xor 5 236 5 251 50 1310 50 1274
send_bmethod 5 116 5 119 50 5539 50 5544
send_cfunc_block 5 106 5 97 50 360 50 335
send_rubyfunc_block 5 250 5 242 50 6923 50 6923
setivar 5 360 5 354 50 4925 50 4929
setivar_object 5 339 5 327 50 746 50 542
setivar_young 5 342 5 327 50 798 50 563
str_concat 5 392 5 414 50 1198 50 1050
throw 5 1091 5 1138 50 1410 50 1584

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) 1549994 1331464 205 2579 0 0% 0 0 78.029738
chunky-png (click) 316655 283595 74 1322 1 0% 0 0 37.542905
erubi-rails (click) 1973187 1783914 262 3732 22 0% 0 0 101.993801
hexapdf (click) 1528146 1377906 594 15712 44 0% 0 0 443.160738
liquid-c (click) 554944 429244 114 2228 5 0% 0 0 59.740069
liquid-compile (click) 475707 378673 146 2694 2 0% 0 0 79.850491
liquid-render (click) 662013 553465 131 2946 8 0% 0 0 81.03303
lobsters (click) 8457221 7008282 3099 62299 118 0% 0 0 2102.399203
mail (click) 864007 768647 342 7696 40 0% 0 0 213.379928
psych-load (click) 288207 241655 61 830 2 0% 0 0 24.172071
railsbench (click) 3353055 2907664 1605 19593 47 0% 0 0 549.862179
rubocop (click) 5761306 4998132 3001 56842 125 0% 6 0 1686.048085
ruby-lsp (click) 962785 866552 347 6781 44 0% 1 0 184.219877
sequel (click) 502558 414907 11 119 0 0% 0 0 3.951879
shipit (click) 7603259 6341132 3263 51888 180 0% 0 0 1735.868736
binarytrees (click) 7273 6911 6 64 0 0% 0 0 2.602591
blurhash (click) 52295 51444 27 603 0 0% 0 0 17.692151
erubi (click) 235967 201763 5 125 0 0% 0 0 3.886741
etanni (click) 32930 35718 8 114 0 0% 0 0 3.617537
fannkuchredux (click) 24746 40953 3 399 0 0% 0 0 10.735813
fluentd (click) 490692 466507 7 115 0 0% 0 0 3.775832
graphql (click) 398743 324159 73 1920 18 0% 0 0 54.384418
graphql-native (click) 354216 303241 39 532 0 0% 0 0 13.866283
lee (click) 306186 292021 49 1070 0 0% 0 0 31.551289
matmul (click) 11125 4603 8 132 0 0% 0 0 4.24515
nbody (click) 13890 20235 6 238 0 0% 0 0 5.901959
nqueens (click) 22652 36960 5 387 0 0% 0 0 10.177404
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 111.189484
protoboeuf (click) 170160 177773 12 2836 0 0% 0 0 72.918863
protoboeuf-encode (click) 243046 283791 14 1815 0 0% 0 0 44.766097
rack (click) 280740 257058 35 580 0 0% 0 0 15.236105
ruby-json (click) 19791 17761 8 204 0 0% 0 0 5.561819
rubyboy (click) 703219 637603 154 6864 42 0% 0 0 167.550797
rubykon (click) 146441 162602 137 2076 3 0% 0 0 56.278556
sudoku (click) 52157 66291 7 871 0 0% 0 0 23.171477
tinygql (click) 298152 260938 59 1031 5 0% 0 0 27.214397
30k_ifelse (click) 6219958 5057296 9259 75432 0 0% 0 0 1930.248066
30k_methods (click) 2234566 1592952 5778 19357 0 0% 0 0 475.857652
attr_accessor (click) 4372 7952 3 78 0 0% 0 0 2.139517
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.528844
fib (click) 2659 2995 3 30 0 0% 0 0 1.102608
getivar (click) 3812 6802 3 78 0 0% 0 0 1.9681
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.829566
loops-times (click) 6972 8013 5 93 0 0% 0 0 2.792182
object-new (click) 2406 2818 2 36 0 0% 0 0 1.102027
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.11551
ruby-xor (click) 5876 8690 4 100 0 0% 0 0 2.701797
send_bmethod (click) 5238 4968 6 71 0 0% 0 0 1.748206
send_cfunc_block (click) 14669 12471 5 195 0 0% 0 0 4.247538
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.470014
setivar (click) 2783 3726 3 46 0 0% 0 0 1.273973
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.454532
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.769324
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.484154
throw (click) 5953 4624 5 53 0 0% 0 0 1.813544

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.