YJIT Benchmarks

Details for Benchmarks at 2025-06-22 03:58:06 UTC

YJIT metrics from the yjit-bench suite using Ruby 353fa6f0ba.

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 91.6% faster than CRuby 3.5.0dev
  • 4.8% faster than YJIT 3.3.6
On railsbench it is
  • 104.4% faster than CRuby 3.5.0dev
  • 7.2% faster than YJIT 3.3.6
x86_64 runtime: 4 hours, 27 minutes
aarch64 runtime: 3 hours, 45 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.3.6 warmups CRuby 3.3.6 iters CRuby 3.5.0dev warmups CRuby 3.5.0dev iters YJIT 3.3.6 warmups YJIT 3.3.6 iters YJIT 3.5.0dev warmups YJIT 3.5.0dev iters
activerecord 5 83 5 75 50 154 50 160
chunky-png 5 31 5 31 50 15 50 23
erubi-rails 5 16 5 14 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 421 5 416 50 590 50 630
liquid-compile 5 410 5 453 50 539 50 694
liquid-render 5 171 5 172 50 404 50 432
lobsters 5 20 5 19 50 10 50 10
mail 5 188 5 178 50 250 50 206
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 157 5 153 50 248 50 253
ruby-lsp 5 146 5 151 50 260 50 252
sequel 5 428 5 421 50 566 50 572
binarytrees 5 84 5 80 50 146 50 118
blurhash 5 82 5 84 50 127 50 145
erubi 5 116 5 142 50 98 50 150
etanni 5 91 5 101 50 53 50 70
fannkuchredux 5 52 5 57 50 97 50 100
fluentd 5 62 5 61 50 25 50 29
graphql 5 85 5 82 50 56 50 54
graphql-native 5 49 5 45 50 10 50 15
lee 5 22 5 21 50 10 50 10
matmul 5 51 5 48 50 88 50 90
nbody 5 249 5 228 50 585 50 698
nqueens 5 120 5 126 50 75 50 517
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 174 5 160 50 621 50 729
protoboeuf-encode 5 178 5 199 50 327 50 798
rack 5 581 5 615 50 961 50 1043
ruby-json 5 84 5 82 50 49 50 47
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 21 50 10 50 10
sudoku 5 47 5 51 50 163 50 149
tinygql 5 35 5 35 50 22 50 31
30k_ifelse 5 28 5 27 50 215 50 184
30k_methods 5 39 5 38 50 480 50 470
cfunc_itself 5 357 5 356 50 1146 50 1258
fib 5 124 5 140 50 902 50 931
getivar 5 213 5 289 50 2252 50 2388
keyword_args 5 104 5 102 50 1041 50 1243
loops-times 5 24 5 25 50 48 50 54
object-new 5 322 5 358 50 405 50 584
respond_to 5 134 5 134 50 3257 50 3900
ruby-xor 5 245 5 251 50 799 50 1295
setivar 5 361 5 378 50 3192 50 4959
setivar_object 5 353 5 362 50 671 50 618
setivar_young 5 359 5 362 50 703 50 651
str_concat 5 395 5 454 50 978 50 1038
throw 5 1266 5 1282 50 1711 50 1731

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) 1492999 1264322 206 2590 0 0% 0 0 74.891672
chunky-png (click) 332833 283152 74 1322 1 0% 0 0 39.433933
erubi-rails (click) 1981730 1760015 262 3658 21 0% 0 0 108.019227
hexapdf (click) 1489000 1316121 593 15613 40 0% 0 0 451.509062
liquid-c (click) 503207 410406 114 2217 5 0% 0 0 61.928309
liquid-compile (click) 427235 388211 146 2690 2 0% 0 0 79.052529
liquid-render (click) 613881 619764 131 2933 8 0% 0 0 80.873157
lobsters (click) 8522326 7178403 3167 63963 118 0% 0 0 2264.124675
mail (click) 797710 700067 342 7232 40 0% 0 0 205.64636
psych-load (click) 269549 220974 61 825 3 0% 0 0 24.317659
railsbench (click) 3385973 2957517 1653 20203 56 0% 0 0 577.808747
rubocop (click) 5893704 5210147 2885 61705 114 0% 4 0 1792.618275
ruby-lsp (click) 881413 877293 305 5956 29 0% 0 0 166.207705
sequel (click) 480893 412794 11 114 0 0% 0 0 4.096764
binarytrees (click) 7273 6911 6 64 0 0% 0 0 2.669483
blurhash (click) 52295 51444 27 603 0 0% 0 0 18.28314
erubi (click) 242429 218143 5 125 0 0% 0 0 3.947796
etanni (click) 30806 32125 8 108 0 0% 0 0 3.505955
fannkuchredux (click) 24746 40953 3 399 0 0% 0 0 11.198214
fluentd (click) 389395 333882 7 115 0 0% 0 0 3.83912
graphql (click) 433664 357311 66 1035 0 0% 0 0 28.380741
graphql-native (click) 384613 354085 37 399 0 0% 0 0 11.097301
lee (click) 292975 253836 45 1012 0 0% 0 0 30.590547
matmul (click) 11125 4603 8 132 0 0% 0 0 4.229114
nbody (click) 13890 20235 6 238 0 0% 0 0 5.837101
nqueens (click) 22652 36960 5 387 0 0% 0 0 10.439346
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 113.351322
protoboeuf (click) 170160 177773 12 2836 0 0% 0 0 75.888752
protoboeuf-encode (click) 243046 283791 14 1815 0 0% 0 0 47.049288
rack (click) 249001 197172 31 496 0 0% 0 0 13.260493
ruby-json (click) 20449 18419 8 204 0 0% 0 0 5.791425
rubyboy (click) 706048 652347 177 6962 40 0% 0 0 180.561195
rubykon (click) 147914 164247 137 2092 3 0% 0 0 57.611219
sudoku (click) 52157 66291 7 871 0 0% 0 0 24.062992
tinygql (click) 315239 284169 58 977 5 0% 0 0 27.423206
30k_ifelse (click) 6219958 5057296 9259 75432 0 0% 0 0 1971.695791
30k_methods (click) 2234566 1592952 5778 19357 0 0% 0 0 492.594686
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.497058
fib (click) 2659 2995 3 30 0 0% 0 0 1.068349
getivar (click) 3812 6802 3 78 0 0% 0 0 1.903093
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.800086
loops-times (click) 6972 8013 5 93 0 0% 0 0 2.783939
object-new (click) 2406 2818 2 36 0 0% 0 0 1.12851
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.120078
ruby-xor (click) 5863 8622 4 100 0 0% 0 0 2.719246
setivar (click) 2783 3726 3 46 0 0% 0 0 1.271921
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.403373
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.719066
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.530467
throw (click) 5953 4624 5 53 0 0% 0 0 1.801364

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.