Ruby Benchmarks

Details for Benchmarks at 2025-11-03 00:41:52 UTC

YJIT metrics from the ruby-bench suite using Ruby 4a3d8346a6.

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 91.7% faster than CRuby 3.5.0dev
  • the same speed as YJIT 3.4.7
On railsbench it is
  • 98.6% faster than CRuby 3.5.0dev
  • 2.2% faster than YJIT 3.4.7
x86_64 runtime: 7 hours, 10 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 83 50 191 50 221
chunky-png 5 31 5 32 50 32 50 26
erubi-rails 5 15 5 14 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 420 5 392 50 622 50 547
liquid-compile 5 420 5 462 50 584 50 677
liquid-render 5 171 5 162 50 434 50 376
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 177 50 253 50 217
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 156 50 247 50 247
ruby-lsp 5 143 5 146 50 232 50 239
sequel 5 418 5 415 50 586 50 561
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 145
erubi 5 137 5 121 50 135 50 127
etanni 5 97 5 66 50 72 50 28
fannkuchredux 5 54 5 57 50 102 50 100
fluentd 5 57 5 57 50 20 50 28
graphql 5 373 5 452 50 568 50 906
graphql-native 5 58 5 78 50 23 50 63
knucleotide 5 163 5 160 50 117 50 115
lee 5 23 5 22 50 10 50 10
matmul 5 51 5 53 50 94 50 91
nbody 5 246 5 295 50 676 50 697
nqueens 5 116 5 128 50 556 50 557
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 177 50 706 50 655
protoboeuf-encode 5 198 5 202 50 829 50 795
rack 5 436 5 436 50 703 50 674
ruby-json 5 82 5 92 50 47 50 65
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 47 50 157 50 147
tinygql 5 41 5 42 50 36 50 46
30k_ifelse 5 28 5 27 50 185 50 183
30k_methods 5 38 5 36 50 451 50 456
attr_accessor 5 157 5 201 50 1835 50 1926
cfunc_itself 5 347 5 359 50 1255 50 1258
fib 5 124 5 139 50 939 50 939
getivar 5 215 5 297 50 2317 50 2413
keyword_args 5 100 5 104 50 1240 50 1242
loops-times 5 23 5 25 50 64 50 57
object-new 5 268 5 355 50 297 50 591
respond_to 5 139 5 136 50 3885 50 3900
ruby-xor 5 237 5 253 50 1315 50 1276
send_bmethod 5 116 5 111 50 5539 50 5543
send_cfunc_block 5 105 5 99 50 353 50 334
send_rubyfunc_block 5 250 5 244 50 6923 50 6932
setivar 5 360 5 352 50 4925 50 4927
setivar_object 5 341 5 327 50 753 50 543
setivar_young 5 341 5 327 50 798 50 563
str_concat 5 390 5 414 50 1202 50 987
structaref 5 156 5 191 50 1812 50 1883
throw 5 1092 5 1111 50 1417 50 1537

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) 1550354 1298907 205 2579 0 0% 0 0 74.142917
chunky-png (click) 319625 276753 74 1322 1 0% 0 0 37.768341
erubi-rails (click) 1970366 1755985 261 3686 22 0% 0 0 99.62603
hexapdf (click) 1525091 1350163 593 15674 44 0% 0 0 435.130672
liquid-c (click) 555792 495374 114 2228 5 0% 0 0 60.171727
liquid-compile (click) 467343 393547 146 2709 2 0% 0 0 79.001047
liquid-render (click) 662150 627206 131 2946 8 0% 0 0 80.028743
lobsters (click) 8461068 7071387 3101 62439 118 0% 0 0 2102.269657
mail (click) 864365 768846 342 7696 40 0% 0 0 212.389845
psych-load (click) 288685 209322 61 832 2 0% 0 0 23.846535
railsbench (click) 3359746 2871364 1605 19666 47 0% 0 0 552.105622
rubocop (click) 5758025 5045573 3001 56854 126 0% 6 0 1654.174783
ruby-lsp (click) 963098 875010 347 6784 44 0% 1 0 181.756532
sequel (click) 502771 390368 11 119 0 0% 0 0 3.979131
shipit (click) 7741835 6552178 3344 53479 181 0% 1 0 1772.266016
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.855262
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.855425
erubi (click) 247092 222533 6 134 0 0% 0 0 3.974201
etanni (click) 32930 35718 8 114 0 0% 0 0 3.607375
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.886392
fluentd (click) 489557 457176 7 115 0 0% 0 0 3.74312
graphql (click) 410111 353291 73 1921 19 0% 0 0 53.756167
graphql-native (click) 354576 311672 39 532 0 0% 0 0 13.815064
knucleotide (click) 9997 11103 7 113 0 0% 0 0 7.190631
lee (click) 318214 321487 49 1097 0 0% 0 0 31.493864
matmul (click) 11103 4709 8 136 0 0% 0 0 4.239423
nbody (click) 14448 21176 6 251 0 0% 0 0 6.143416
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.224747
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 110.581963
protoboeuf (click) 170129 177717 12 2837 0 0% 0 0 73.000807
protoboeuf-encode (click) 243065 283735 14 1816 0 0% 0 0 44.252717
rack (click) 281146 273710 35 580 0 0% 0 0 15.222719
ruby-json (click) 19868 17928 8 206 0 0% 0 0 5.657633
rubyboy (click) 703542 588824 154 6868 42 0% 0 0 166.731636
rubykon (click) 146441 162602 137 2076 3 0% 0 0 56.284394
sudoku (click) 52278 66593 7 878 0 0% 0 0 23.181953
tinygql (click) 300627 247072 59 1031 5 0% 0 0 27.340386
30k_ifelse (click) 6222887 5052688 9260 75477 0 0% 0 0 1927.052284
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 489.730157
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.106003
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.498328
fib (click) 2659 2995 3 30 0 0% 0 0 1.146221
getivar (click) 3789 6778 3 79 0 0% 0 0 1.955313
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.824581
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.925823
object-new (click) 2406 2818 2 36 0 0% 0 0 1.076449
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.11801
ruby-xor (click) 6026 856 4 105 0 0% 0 0 2.848285
send_bmethod (click) 5238 4968 6 71 0 0% 0 0 1.72902
send_cfunc_block (click) 14669 12471 5 195 0 0% 0 0 4.326798
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.477309
setivar (click) 2783 3726 3 46 0 0% 0 0 1.296178
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.470358
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.743328
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.456434
structaref (click) 4407 9095 3 88 0 0% 0 0 2.369267
throw (click) 5953 4624 5 53 0 0% 0 0 1.769742

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.