Ruby Benchmarks

Details for Benchmarks at 2025-11-14 00:40:09 UTC

YJIT metrics from the ruby-bench suite using Ruby 6e5bbbc598.

Using the geomean of the headline benchmarks for x86 YJIT 4.0.0dev is
  • 94.0% faster than CRuby 4.0.0dev
  • the same speed as YJIT 3.4.7
On railsbench it is
  • 103.1% faster than CRuby 4.0.0dev
  • 2.7% faster than YJIT 3.4.7
x86_64 runtime: 7 hours, 26 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 85 5 87 50 194 50 213
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 419 5 390 50 623 50 564
liquid-compile 5 415 5 469 50 552 50 682
liquid-render 5 172 5 167 50 437 50 382
lobsters 5 19 5 20 50 10 50 10
mail 5 195 5 135 50 254 50 187
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 246 50 246
ruby-lsp 5 141 5 146 50 236 50 239
sequel 5 430 5 413 50 584 50 592
shipit 5 10 5 10 50 10 50 10
binarytrees 5 82 5 82 50 136 50 127
blurhash 5 83 5 87 50 143 50 145
erubi 5 134 5 140 50 134 50 140
etanni 5 98 5 69 50 71 50 34
fannkuchredux 5 54 5 56 50 102 50 98
fluentd 5 56 5 63 50 20 50 30
graphql 5 372 5 461 50 572 50 914
graphql-native 5 58 5 83 50 22 50 62
knucleotide 5 163 5 153 50 117 50 107
lee 5 23 5 22 50 10 50 10
matmul 5 51 5 50 50 94 50 91
nbody 5 246 5 271 50 676 50 661
nqueens 5 116 5 123 50 556 50 558
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 178 50 706 50 659
protoboeuf-encode 5 198 5 202 50 836 50 788
rack 5 438 5 445 50 724 50 686
ruby-json 5 84 5 94 50 50 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 150
tinygql 5 41 5 43 50 37 50 47
30k_ifelse 5 28 5 28 50 184 50 183
30k_methods 5 38 5 40 50 451 50 457
attr_accessor 5 157 5 138 50 1835 50 1929
cfunc_itself 5 347 5 345 50 1254 50 1259
fib 5 124 5 141 50 935 50 938
getivar 5 218 5 302 50 2313 50 2413
keyword_args 5 100 5 108 50 1240 50 1242
loops-times 5 23 5 25 50 63 50 56
object-new 5 268 5 351 50 298 50 570
respond_to 5 139 5 130 50 3882 50 3894
ruby-xor 5 236 5 254 50 1314 50 1287
send_bmethod 5 117 5 125 50 5538 50 5532
send_cfunc_block 5 105 5 106 50 353 50 338
send_rubyfunc_block 5 250 5 247 50 6917 50 6904
setivar 5 360 5 364 50 4927 50 4941
setivar_object 5 341 5 346 50 750 50 583
setivar_young 5 341 5 346 50 796 50 619
str_concat 5 391 5 399 50 1196 50 1167
structaref 5 156 5 199 50 1813 50 1901
throw 5 1089 5 1255 50 1418 50 1562

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) 1551223 1365905 205 2579 0 0% 0 0 73.217512
chunky-png (click) 318765 277691 74 1322 1 0% 0 0 37.676665
erubi-rails (click) 1374656 1146090 267 3623 22 0% 0 0 97.115842
hexapdf (click) 1527436 1409947 594 15699 44 0% 0 0 441.663721
liquid-c (click) 544936 491658 114 2228 5 0% 0 0 60.178744
liquid-compile (click) 480350 457208 146 2725 2 0% 0 0 80.203391
liquid-render (click) 662417 603172 131 2946 8 0% 0 0 79.649343
lobsters (click) 8522077 7183221 3102 62375 118 0% 0 0 2095.640336
mail (click) 864344 826367 342 7696 40 0% 0 0 214.293543
psych-load (click) 286365 239874 61 832 2 0% 0 0 24.037306
railsbench (click) 3355223 2908509 1605 19580 47 0% 0 0 550.88566
rubocop (click) 5761507 5007684 3001 56863 126 0% 6 0 1779.570776
ruby-lsp (click) 963128 875237 347 6784 44 0% 1 0 184.715946
sequel (click) 501581 413368 11 119 0 0% 0 0 3.809748
shipit (click) 7595246 6433473 3263 51788 180 0% 0 0 1708.554325
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.868704
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.833633
erubi (click) 247931 207064 6 134 0 0% 0 0 4.023817
etanni (click) 32930 35718 8 114 0 0% 0 0 3.643955
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.910329
fluentd (click) 491270 418421 7 115 0 0% 0 0 3.747454
graphql (click) 410388 353818 73 1921 19 0% 0 0 53.944148
graphql-native (click) 354458 262617 39 532 0 0% 0 0 14.249055
knucleotide (click) 9997 11103 7 113 0 0% 0 0 7.046501
lee (click) 318232 288954 49 1097 0 0% 0 0 31.783801
matmul (click) 11103 4709 8 136 0 0% 0 0 4.287202
nbody (click) 14448 21176 6 251 0 0% 0 0 6.123195
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.206234
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 111.418454
protoboeuf (click) 170129 177717 12 2837 0 0% 0 0 73.436266
protoboeuf-encode (click) 243065 283735 14 1816 0 0% 0 0 45.353165
rack (click) 281413 257848 35 580 0 0% 0 0 15.14259
ruby-json (click) 19868 17928 8 206 0 0% 0 0 5.658935
rubyboy (click) 703948 663149 154 6864 42 0% 0 0 168.485623
rubykon (click) 148508 140471 137 2101 3 0% 0 0 57.744992
sudoku (click) 52278 66593 7 878 0 0% 0 0 23.353151
tinygql (click) 300601 255450 59 1031 5 0% 0 0 27.633175
30k_ifelse (click) 6222887 5052688 9260 75477 0 0% 0 0 1941.646902
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 491.74627
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.134298
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.513392
fib (click) 2659 2995 3 30 0 0% 0 0 1.150775
getivar (click) 3789 6778 3 79 0 0% 0 0 1.983817
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.840166
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.928451
object-new (click) 2406 2818 2 36 0 0% 0 0 1.112011
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.102605
ruby-xor (click) 6026 856 4 105 0 0% 0 0 2.864268
send_bmethod (click) 5238 4968 6 71 0 0% 0 0 1.771589
send_cfunc_block (click) 14669 12471 5 195 0 0% 0 0 4.279377
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.505323
setivar (click) 2783 3726 3 46 0 0% 0 0 1.290609
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.462395
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.748919
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.48834
structaref (click) 4407 9095 3 88 0 0% 0 0 2.377398
throw (click) 5953 4624 5 53 0 0% 0 0 1.799866

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.