Ruby Benchmarks

Details for Benchmarks at 2025-10-27 01:03:27 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 90.8% faster than CRuby 3.5.0dev
  • the same speed as YJIT 3.4.7
On railsbench it is
  • 108.7% faster than CRuby 3.5.0dev
  • 4.8% 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 83 5 85 50 196 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 420 5 380 50 626 50 509
liquid-compile 5 418 5 467 50 546 50 706
liquid-render 5 171 5 167 50 413 50 372
lobsters 5 20 5 20 50 10 50 10
mail 5 195 5 180 50 253 50 229
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 153 5 154 50 247 50 244
ruby-lsp 5 141 5 145 50 241 50 239
sequel 5 425 5 418 50 584 50 582
shipit 5 10 5 10 50 10 50 10
binarytrees 5 82 5 81 50 136 50 127
blurhash 5 83 5 88 50 143 50 144
erubi 5 137 5 135 50 136 50 128
etanni 5 97 5 66 50 72 50 30
fannkuchredux 5 54 5 56 50 100 50 102
fluentd 5 61 5 61 50 20 50 29
graphql 5 373 5 450 50 534 50 917
graphql-native 5 57 5 82 50 22 50 63
lee 5 23 5 23 50 10 50 10
matmul 5 51 5 54 50 95 50 91
nbody 5 247 5 290 50 704 50 697
nqueens 5 116 5 128 50 556 50 563
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 182 50 706 50 704
protoboeuf-encode 5 197 5 184 50 838 50 782
rack 5 442 5 438 50 712 50 677
ruby-json 5 80 5 80 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 157 50 155
tinygql 5 41 5 42 50 35 50 46
30k_ifelse 5 28 5 27 50 183 50 184
30k_methods 5 38 5 37 50 475 50 462
attr_accessor 5 157 5 195 50 1826 50 1907
cfunc_itself 5 347 5 349 50 1255 50 1258
fib 5 124 5 141 50 937 50 937
getivar 5 217 5 308 50 2314 50 2366
keyword_args 5 99 5 95 50 1240 50 1242
loops-times 5 23 5 25 50 62 50 56
object-new 5 268 5 355 50 297 50 593
respond_to 5 139 5 136 50 3885 50 3902
ruby-xor 5 236 5 247 50 1311 50 1274
send_bmethod 5 116 5 119 50 5539 50 5542
send_cfunc_block 5 106 5 106 50 360 50 345
send_rubyfunc_block 5 230 5 249 50 6924 50 6931
setivar 5 360 5 349 50 4925 50 4920
setivar_object 5 339 5 327 50 747 50 547
setivar_young 5 342 5 326 50 799 50 561
str_concat 5 389 5 398 50 1201 50 1020
throw 5 1087 5 1136 50 1427 50 1517

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 1331432 205 2579 0 0% 0 0 73.734142
chunky-png (click) 318585 284182 74 1322 1 0% 0 0 37.597995
erubi-rails (click) 1969272 1712329 262 3719 22 0% 0 0 100.263416
hexapdf (click) 1526700 1368408 594 15698 44 0% 0 0 438.952374
liquid-c (click) 555432 495135 114 2228 5 0% 0 0 59.702691
liquid-compile (click) 477507 446081 146 2698 2 0% 0 0 78.750796
liquid-render (click) 661790 545067 131 2946 8 0% 0 0 79.31871
lobsters (click) 8450214 6986358 3101 62315 118 0% 0 0 2158.387546
mail (click) 864266 842490 342 7699 40 0% 0 0 213.074346
psych-load (click) 288162 217050 61 830 2 0% 0 0 24.264035
railsbench (click) 3358248 2887833 1605 19661 47 0% 0 0 553.944703
rubocop (click) 5760081 4957137 3001 56851 125 0% 6 0 1689.290175
ruby-lsp (click) 964035 876048 346 6753 43 0% 1 0 181.309162
sequel (click) 502521 406632 11 119 0 0% 0 0 3.895633
shipit (click) 7591696 6377879 3262 51771 180 0% 0 0 1712.260779
binarytrees (click) 7273 6911 6 64 0 0% 0 0 2.621877
blurhash (click) 52295 51444 27 603 0 0% 0 0 17.73429
erubi (click) 246996 214197 5 125 0 0% 0 0 3.805164
etanni (click) 32930 35718 8 114 0 0% 0 0 3.584753
fannkuchredux (click) 24746 40953 3 399 0 0% 0 0 10.935851
fluentd (click) 489576 457367 7 115 0 0% 0 0 3.727821
graphql (click) 409762 361193 73 1920 19 0% 0 0 54.349729
graphql-native (click) 354213 311433 39 532 0 0% 0 0 13.978147
lee (click) 317215 304389 49 1070 0 0% 0 0 31.300265
matmul (click) 11125 4603 8 132 0 0% 0 0 4.219495
nbody (click) 13890 20235 6 238 0 0% 0 0 5.903338
nqueens (click) 22652 36960 5 387 0 0% 0 0 10.227761
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 111.025505
protoboeuf (click) 170160 177773 12 2836 0 0% 0 0 72.863409
protoboeuf-encode (click) 243046 283791 14 1815 0 0% 0 0 44.52691
rack (click) 280745 248837 35 580 0 0% 0 0 15.137999
ruby-json (click) 19791 17761 8 204 0 0% 0 0 5.607343
rubyboy (click) 703030 637401 154 6860 42 0% 0 0 167.560369
rubykon (click) 146229 162118 137 2070 3 0% 0 0 56.052713
sudoku (click) 52157 66291 7 871 0 0% 0 0 23.311772
tinygql (click) 300226 254976 59 1031 5 0% 0 0 26.979516
30k_ifelse (click) 6219958 5057296 9259 75432 0 0% 0 0 1915.655493
30k_methods (click) 2234566 1592952 5778 19357 0 0% 0 0 472.669037
attr_accessor (click) 4372 7952 3 78 0 0% 0 0 2.135191
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.526564
fib (click) 2659 2995 3 30 0 0% 0 0 1.141059
getivar (click) 3812 6802 3 78 0 0% 0 0 1.991025
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.810343
loops-times (click) 6972 8013 5 93 0 0% 0 0 2.777852
object-new (click) 2406 2818 2 36 0 0% 0 0 1.085313
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.14384
ruby-xor (click) 5876 8690 4 100 0 0% 0 0 2.724378
send_bmethod (click) 5238 4968 6 71 0 0% 0 0 1.776189
send_cfunc_block (click) 14669 12471 5 195 0 0% 0 0 4.383357
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.508253
setivar (click) 2783 3726 3 46 0 0% 0 0 1.275946
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.45983
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.761703
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.528395
throw (click) 5953 4624 5 53 0 0% 0 0 1.81563

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.