Ruby Benchmarks

Details for Benchmarks at 2025-11-08 00:36:59 UTC

YJIT metrics from the ruby-bench suite using Ruby 7037d8f89e.

Using the geomean of the headline benchmarks for x86 YJIT 4.0.0dev is
  • 90.9% faster than CRuby 4.0.0dev
  • the same speed as YJIT 3.4.7
On railsbench it is
  • 98.8% faster than CRuby 4.0.0dev
  • 3.9% faster than YJIT 3.4.7
x86_64 runtime: 7 hours, 23 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 4.0.0dev warmups CRuby 4.0.0dev iters YJIT 3.4.7 warmups YJIT 3.4.7 iters YJIT 4.0.0dev warmups YJIT 4.0.0dev iters
activerecord 5 82 5 85 50 193 50 206
chunky-png 5 31 5 32 50 33 50 26
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 420 5 389 50 625 50 546
liquid-compile 5 421 5 468 50 583 50 692
liquid-render 5 172 5 166 50 412 50 378
lobsters 5 20 5 20 50 10 50 10
mail 5 195 5 165 50 252 50 190
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 157 50 248 50 248
ruby-lsp 5 141 5 147 50 227 50 242
sequel 5 419 5 427 50 585 50 590
shipit 5 10 5 10 50 10 50 10
binarytrees 5 82 5 82 50 136 50 126
blurhash 5 83 5 85 50 143 50 144
erubi 5 134 5 132 50 135 50 125
etanni 5 98 5 63 50 72 50 30
fannkuchredux 5 54 5 57 50 102 50 99
fluentd 5 56 5 57 50 20 50 28
graphql 5 369 5 457 50 572 50 900
graphql-native 5 59 5 82 50 22 50 61
knucleotide 5 163 5 159 50 116 50 113
lee 5 23 5 22 50 10 50 10
matmul 5 51 5 49 50 95 50 91
nbody 5 247 5 261 50 676 50 694
nqueens 5 116 5 129 50 556 50 557
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 177 50 706 50 645
protoboeuf-encode 5 198 5 198 50 833 50 790
rack 5 437 5 441 50 719 50 677
ruby-json 5 82 5 93 50 47 50 64
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 147
tinygql 5 40 5 43 50 40 50 46
30k_ifelse 5 28 5 28 50 185 50 183
30k_methods 5 38 5 40 50 446 50 448
attr_accessor 5 157 5 205 50 1835 50 1933
cfunc_itself 5 347 5 349 50 1255 50 1259
fib 5 124 5 135 50 938 50 939
getivar 5 217 5 289 50 2314 50 2401
keyword_args 5 100 5 100 50 1240 50 1243
loops-times 5 23 5 25 50 63 50 57
object-new 5 268 5 354 50 299 50 580
respond_to 5 139 5 133 50 3888 50 3894
ruby-xor 5 236 5 248 50 1315 50 1274
send_bmethod 5 116 5 123 50 5539 50 5537
send_cfunc_block 5 106 5 100 50 353 50 332
send_rubyfunc_block 5 251 5 248 50 6920 50 6922
setivar 5 360 5 340 50 4929 50 4908
setivar_object 5 341 5 319 50 748 50 545
setivar_young 5 344 5 318 50 797 50 562
str_concat 5 390 5 386 50 1201 50 1010
structaref 5 156 5 201 50 1810 50 1897
throw 5 1090 5 1234 50 1425 50 1563

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) 1550620 1299597 205 2579 0 0% 0 0 77.920024
chunky-png (click) 317323 243425 74 1322 1 0% 0 0 37.590692
erubi-rails (click) 1383747 1140186 267 3696 22 0% 0 0 98.974059
hexapdf (click) 1526175 1384028 593 15683 44 0% 0 0 436.32774
liquid-c (click) 544936 491658 114 2228 5 0% 0 0 59.515938
liquid-compile (click) 479050 447828 146 2709 2 0% 0 0 79.703053
liquid-render (click) 662941 628324 131 2946 8 0% 0 0 79.590598
lobsters (click) 8465158 7040513 3100 62474 118 0% 0 0 2090.445925
mail (click) 864648 777484 342 7696 40 0% 0 0 214.073603
psych-load (click) 280787 257884 61 832 2 0% 0 0 23.699425
railsbench (click) 3356642 2909731 1605 19596 47 0% 0 0 548.623529
rubocop (click) 5780364 4854795 3001 57062 126 0% 6 0 1668.831505
ruby-lsp (click) 963194 875478 347 6784 44 0% 1 0 183.890352
sequel (click) 503148 456597 11 119 0 0% 0 0 3.831548
shipit (click) 7602841 6461585 3262 51818 180 0% 0 0 1700.700594
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.848762
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.957102
erubi (click) 243441 211314 6 134 0 0% 0 0 4.005596
etanni (click) 32930 35718 8 114 0 0% 0 0 3.620187
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.878831
fluentd (click) 490981 434265 7 115 0 0% 0 0 3.726843
graphql (click) 410388 353818 73 1921 19 0% 0 0 53.992156
graphql-native (click) 354458 262617 39 532 0 0% 0 0 14.109792
knucleotide (click) 9997 11103 7 113 0 0% 0 0 7.261324
lee (click) 318201 280821 49 1097 0 0% 0 0 31.647273
matmul (click) 11103 4709 8 136 0 0% 0 0 4.282603
nbody (click) 14448 21176 6 251 0 0% 0 0 6.181791
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.255752
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 110.780481
protoboeuf (click) 170129 177717 12 2837 0 0% 0 0 73.460337
protoboeuf-encode (click) 243065 283735 14 1816 0 0% 0 0 44.868861
rack (click) 281408 233272 35 580 0 0% 0 0 14.893865
ruby-json (click) 19868 17928 8 206 0 0% 0 0 5.652316
rubyboy (click) 692418 642207 154 6868 42 0% 0 0 167.509564
rubykon (click) 146229 162118 137 2070 3 0% 0 0 56.553422
sudoku (click) 52278 66593 7 878 0 0% 0 0 23.201853
tinygql (click) 300889 272170 59 1031 5 0% 0 0 27.154299
30k_ifelse (click) 6222887 5052688 9260 75477 0 0% 0 0 1923.585014
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 489.312637
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.106001
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.48235
fib (click) 2659 2995 3 30 0 0% 0 0 1.140388
getivar (click) 3789 6778 3 79 0 0% 0 0 1.990791
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.845084
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.916997
object-new (click) 2406 2818 2 36 0 0% 0 0 1.111672
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.142955
ruby-xor (click) 6026 856 4 105 0 0% 0 0 2.843913
send_bmethod (click) 5238 4968 6 71 0 0% 0 0 1.766375
send_cfunc_block (click) 14669 12471 5 195 0 0% 0 0 4.295623
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.493249
setivar (click) 2783 3726 3 46 0 0% 0 0 1.330858
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.473568
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.793315
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.507572
structaref (click) 4407 9095 3 88 0 0% 0 0 2.385595
throw (click) 5953 4624 5 53 0 0% 0 0 1.791897

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.