YJIT Benchmarks

Details for Benchmarks at 2024-08-26 03:20:07 UTC

YJIT metrics from the yjit-bench suite using Ruby 45c04cad40

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 76.5% faster than CRuby 3.4.0dev
  • 3.7% faster than YJIT 3.3.4
On railsbench it is
  • 78.4% faster than CRuby 3.4.0dev
  • the same speed as YJIT 3.3.4

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.4 warmups CRuby 3.3.4 iters CRuby 3.4.0dev warmups CRuby 3.4.0dev iters YJIT 3.3.4 warmups YJIT 3.3.4 iters YJIT 3.4.0dev warmups YJIT 3.4.0dev iters
activerecord 10 57 10 57 10 145 10 156
chunky-png 10 18 10 18 10 35 10 40
erubi-rails 10 10 10 10 10 23 10 23
hexapdf 10 10 10 10 10 10 10 10
liquid-c 10 349 10 351 10 484 10 515
liquid-compile 10 345 10 342 10 523 10 526
liquid-render 10 138 10 136 10 357 10 374
lobsters 10 13 10 13 10 24 10 23
mail 10 161 10 158 10 238 10 229
psych-load 10 10 10 10 10 10 10 10
railsbench 10 10 10 10 10 10 10 10
rubocop 10 134 10 132 10 235 10 239
ruby-lsp 10 128 10 124 10 215 10 217
sequel 10 326 10 320 10 440 10 432
binarytrees 10 51 10 51 10 118 10 112
blurhash 10 62 10 63 10 120 10 147
erubi 10 83 10 98 10 105 10 123
etanni 10 60 10 64 10 69 10 77
fannkuchredux 10 10 10 10 10 17 10 18
fluentd 10 10 10 10 10 10 10 10
graphql 10 10 10 10 10 10 10 10
graphql-native 10 28 10 31 10 32 10 36
lee 10 11 10 12 10 20 10 21
matmul 10 10 10 10 10 15 10 18
nbody 10 203 10 215 10 421 10 514
nqueens 10 113 10 114 10 113 10 442
optcarrot 10 10 10 10 10 10 10 10
protoboeuf 10 157 10 153 10 582 10 694
protoboeuf-encode 10 133 10 171 10 293 10 652
rack 10 454 10 483 10 846 10 881
ruby-json 10 10 10 10 10 10 10 10
rubykon 10 10 10 10 10 10 10 10
sudoku 10 10 10 10 10 28 10 32
tinygql 10 23 10 23 10 52 10 53
30k_ifelse 10 10 10 10 10 71 10 69
30k_methods 10 10 10 10 10 26 10 26
cfunc_itself 10 248 10 247 10 1108 10 1212
fib 10 102 10 104 10 616 10 617
getivar 10 214 10 241 10 1247 10 1748
keyword_args 10 87 10 82 10 730 10 947
object-new 10 230 10 217 10 308 10 287
respond_to 10 91 10 93 10 1785 10 2094
ruby-xor 10 30 10 24 10 92 10 165
setivar 10 348 10 360 10 2319 10 4821
setivar_object 10 216 10 226 10 536 10 518
setivar_young 10 217 10 227 10 529 10 533
str_concat 10 319 10 357 10 658 10 684
throw 10 967 10 908 10 1347 10 1214

Different Ruby configurations want different amounts of warmup. With no JIT, CRuby needs hardly any. YJIT and MJIT 3.0 both warm up quite quickly, while MJIT in 3.1 often slows down for a time as it compiles, after an unpredictable delay.

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) 1340314 1171165 214 2178 0 0% 0 0 81.184194
chunky-png (click) 290194 251421 83 1059 1 0% 0 0 36.216902
erubi-rails (click) 1837836 1550512 246 2734 8 0% 0 0 94.024196
hexapdf (click) 1255541 1067313 505 11812 40 0% 0 0 412.47116
liquid-c (click) 465120 384063 119 1768 5 0% 0 0 58.094649
liquid-compile (click) 378409 329452 151 2073 2 0% 0 0 73.037205
liquid-render (click) 559910 514515 136 2326 8 0% 0 0 77.54681
lobsters (click) 7477420 6350691 3077 50087 166 0% 0 0 2260.496523
mail (click) 724029 663881 347 5554 14 0% 0 0 189.154412
psych-load (click) 236872 224435 61 594 3 0% 0 0 21.255933
railsbench (click) 3088868 2491197 1632 15877 41 0% 0 0 595.770536
rubocop (click) 5449265 4626604 2894 50925 114 0% 4 0 1940.718658
ruby-lsp (click) 787015 731418 309 4744 24 0% 0 0 162.41043
sequel (click) 432623 387832 16 115 0 0% 0 0 5.048153
binarytrees (click) 8404 7594 9 66 0 0% 0 0 3.008936
blurhash (click) 50094 43901 30 453 0 0% 0 0 17.690035
erubi (click) 211440 170125 10 112 0 0% 0 0 4.506781
etanni (click) 28405 26890 11 91 0 0% 0 0 3.472221
fannkuchredux (click) 23706 31291 4 252 0 0% 0 0 9.659511
fluentd (click) 325694 271828 4 28 0 0% 0 0 1.31073
graphql (click) 371149 337626 66 650 0 0% 0 0 23.051652
graphql-native (click) 347942 313814 42 278 0 0% 0 0 10.770011
lee (click) 243979 179427 34 531 0 0% 0 0 19.5792
matmul (click) 7957 8968 7 82 0 0% 0 0 3.221552
nbody (click) 15014 19017 10 191 0 0% 0 0 6.17555
nqueens (click) 23822 23823 9 279 0 0% 0 0 10.38595
optcarrot (click) 309010 266612 187 4398 34 0% 0 0 119.020074
protoboeuf (click) 152449 147944 16 1500 0 0% 0 0 52.901172
protoboeuf-encode (click) 222321 205406 18 1239 0 0% 0 0 37.770671
rack (click) 230787 198588 37 408 0 0% 0 0 12.925174
ruby-json (click) 24237 21549 7 165 0 0% 0 0 5.507236
rubykon (click) 128223 123238 136 1480 3 0% 0 0 48.177931
sudoku (click) 45292 24766 7 516 0 0% 0 0 19.107204
tinygql (click) 265938 240482 58 735 5 0% 0 0 24.302712
30k_ifelse (click) 5134313 4729205 9258 50774 0 0% 0 0 1926.245512
30k_methods (click) 2016559 1591611 5777 19335 0 0% 0 0 534.705777
cfunc_itself (click) 7172 6017 8 66 0 0% 0 0 2.336481
fib (click) 4609 4792 7 45 0 0% 0 0 1.84139
getivar (click) 5575 6644 7 70 0 0% 0 0 2.332891
keyword_args (click) 8042 6744 9 68 0 0% 0 0 2.637115
object-new (click) 4039 4024 6 41 0 0% 0 0 1.984496
respond_to (click) 7910 8158 8 81 0 0% 0 0 2.858118
ruby-xor (click) 5219 5772 4 58 0 0% 0 0 1.943891
setivar (click) 4726 5320 7 50 0 0% 0 0 1.896624
setivar_object (click) 5109 5228 7 50 0 0% 0 0 1.967553
setivar_young (click) 5819 5950 8 58 0 0% 0 0 2.181138
str_concat (click) 7415 7947 10 81 0 0% 0 0 3.210973
throw (click) 7538 6222 9 65 0 0% 0 0 2.650953

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.