Ruby Benchmarks

Details for Benchmarks at 2025-11-16 00:43:05 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 4.0.0dev is
  • 86.6% faster than CRuby 4.0.0dev
  • 2.3% slower than YJIT 3.4.7
On railsbench it is
  • 100.4% faster than CRuby 4.0.0dev
  • 1.4% faster than YJIT 3.4.7
x86_64 runtime: 7 hours, 28 minutes
aarch64 runtime: 6 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 83 5 87 50 194 50 199
chunky-png 5 31 5 33 50 33 50 29
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 421 5 392 50 629 50 542
liquid-compile 5 454 5 459 50 584 50 711
liquid-render 5 171 5 167 50 434 50 383
lobsters 5 20 5 20 50 10 50 10
mail 5 195 5 176 50 254 50 146
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 158 50 247 50 249
ruby-lsp 5 138 5 147 50 240 50 242
sequel 5 422 5 431 50 588 50 591
shipit 5 10 5 10 50 10 50 10
binarytrees 5 82 5 83 50 136 50 127
blurhash 5 83 5 87 50 143 50 145
erubi 5 129 5 136 50 119 50 140
etanni 5 98 5 69 50 71 50 34
fannkuchredux 5 54 5 55 50 102 50 98
fluentd 5 56 5 63 50 20 50 32
graphql 5 373 5 462 50 569 50 914
graphql-native 5 58 5 80 50 23 50 60
knucleotide 5 163 5 159 50 118 50 112
lee 5 23 5 22 50 10 50 10
matmul 5 51 5 51 50 94 50 90
nbody 5 246 5 272 50 676 50 663
nqueens 5 116 5 125 50 556 50 565
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 183 50 707 50 741
protoboeuf-encode 5 198 5 206 50 833 50 793
rack 5 438 5 435 50 714 50 704
ruby-json 5 84 5 99 50 47 50 70
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 156
tinygql 5 40 5 44 50 37 50 48
30k_ifelse 5 28 5 28 50 185 50 184
30k_methods 5 39 5 40 50 451 50 456
attr_accessor 5 157 5 203 50 1836 50 1928
cfunc_itself 5 348 5 346 50 1254 50 1258
fib 5 124 5 141 50 939 50 940
getivar 5 216 5 303 50 2314 50 2412
keyword_args 5 100 5 108 50 1239 50 1243
loops-times 5 23 5 24 50 63 50 56
object-new 5 268 5 308 50 297 50 451
respond_to 5 139 5 135 50 3891 50 3907
ruby-xor 5 236 5 254 50 1314 50 1290
send_bmethod 5 116 5 123 50 5539 50 5537
send_cfunc_block 5 105 5 106 50 353 50 339
send_rubyfunc_block 5 252 5 244 50 6925 50 6917
setivar 5 360 5 363 50 4926 50 4941
setivar_object 5 341 5 316 50 749 50 599
setivar_young 5 341 5 322 50 798 50 628
str_concat 5 390 5 400 50 1199 50 1172
structaref 5 157 5 198 50 1810 50 1894
throw 5 1089 5 1147 50 1417 50 1386

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) 1550618 1315876 205 2579 0 0% 0 0 73.399529
chunky-png (click) 305818 271951 74 1330 1 0% 0 0 37.692233
erubi-rails (click) 1385227 1223810 268 3702 22 0% 0 0 98.913136
hexapdf (click) 1515795 1315506 593 15704 44 0% 0 0 438.189476
liquid-c (click) 556062 495916 114 2228 5 0% 0 0 60.262248
liquid-compile (click) 469579 445245 146 2726 2 0% 0 0 81.291194
liquid-render (click) 662643 587039 131 2946 8 0% 0 0 79.638315
lobsters (click) 8503864 7166314 3100 62204 120 0% 0 0 2085.927607
mail (click) 865142 868131 342 7700 40 0% 0 0 213.708871
psych-load (click) 288952 242636 61 832 2 0% 0 0 24.067539
railsbench (click) 3354177 2841431 1605 19555 47 0% 0 0 547.449275
rubocop (click) 5760815 4965736 3001 56847 125 0% 6 0 1664.317861
ruby-lsp (click) 964633 942568 347 6778 44 0% 1 0 182.270519
sequel (click) 503149 464886 11 119 0 0% 0 0 3.992888
shipit (click) 7724113 6511314 3342 53264 181 0% 1 0 1797.179087
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.869854
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.183821
erubi (click) 248631 215957 6 134 0 0% 0 0 4.009814
etanni (click) 32930 35718 8 114 0 0% 0 0 3.570308
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.047805
fluentd (click) 490936 434332 7 115 0 0% 0 0 3.745347
graphql (click) 410388 345650 73 1921 19 0% 0 0 53.654176
graphql-native (click) 354845 279531 39 532 0 0% 0 0 13.796047
knucleotide (click) 9997 11103 7 113 0 0% 0 0 7.887183
lee (click) 318480 272910 49 1097 0 0% 0 0 31.383604
matmul (click) 11103 4709 8 136 0 0% 0 0 4.211088
nbody (click) 14448 21176 6 251 0 0% 0 0 6.112177
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.300515
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 111.512335
protoboeuf (click) 170129 251445 12 2837 0 0% 0 0 72.883462
protoboeuf-encode (click) 243065 308311 14 1816 0 0% 0 0 44.439428
rack (click) 281319 282422 35 580 0 0% 0 0 15.076297
ruby-json (click) 19868 17928 8 206 0 0% 0 0 5.729528
rubyboy (click) 703652 580937 154 6864 42 0% 0 0 167.442362
rubykon (click) 146441 162602 137 2076 3 0% 0 0 56.272151
sudoku (click) 52278 66593 7 878 0 0% 0 0 23.552238
tinygql (click) 289061 259371 59 1037 5 0% 0 0 27.13592
30k_ifelse (click) 6222887 5052688 9260 75477 0 0% 0 0 1919.328286
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 490.390878
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.113034
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.542287
fib (click) 2659 2995 3 30 0 0% 0 0 1.119273
getivar (click) 3789 6778 3 79 0 0% 0 0 1.96454
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.807873
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.849061
object-new (click) 2406 2818 2 36 0 0% 0 0 1.133592
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.184096
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.788402
send_bmethod (click) 5238 4968 6 71 0 0% 0 0 1.791141
send_cfunc_block (click) 14669 12471 5 195 0 0% 0 0 4.272084
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.557309
setivar (click) 2783 3726 3 46 0 0% 0 0 1.267687
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.418367
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.731178
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.451161
structaref (click) 4407 9095 3 88 0 0% 0 0 2.356057
throw (click) 5953 4624 5 53 0 0% 0 0 1.767275

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.