YJIT Benchmarks

Details for Benchmarks at 2024-10-15 04:00:08 UTC

YJIT metrics from the yjit-bench suite using Ruby 6c7209cd37

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 90.1% faster than CRuby 3.4.0dev
  • 6.2% faster than YJIT 3.3.4
On railsbench it is
  • 104.0% faster than CRuby 3.4.0dev
  • 6.4% faster than 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 77 10 78 10 192 10 202
chunky-png 10 26 10 26 10 55 10 62
erubi-rails 10 11 10 10 10 35 10 37
hexapdf 10 10 10 10 10 10 10 11
liquid-c 10 407 10 416 10 625 10 662
liquid-compile 10 402 10 420 10 613 10 636
liquid-render 10 167 10 163 10 449 10 467
lobsters 10 15 10 15 10 30 10 29
mail 10 182 10 185 10 291 10 289
psych-load 10 10 10 10 10 10 10 12
railsbench 10 10 10 10 10 10 10 10
rubocop 10 152 10 148 10 293 10 306
ruby-lsp 10 152 10 153 10 265 10 300
sequel 10 416 10 422 10 629 10 634
binarytrees 10 79 10 78 10 187 10 191
blurhash 10 79 10 78 10 167 10 186
erubi 10 110 10 132 10 104 10 156
etanni 10 85 10 96 10 92 10 104
fannkuchredux 10 48 10 46 10 148 10 159
fluentd 10 57 10 56 10 65 10 76
graphql 10 82 10 83 10 99 10 102
graphql-native 10 35 10 46 10 39 10 54
lee 10 17 10 16 10 29 10 30
matmul 10 49 10 50 10 129 10 139
nbody 10 264 10 248 10 669 10 776
nqueens 10 112 10 106 10 112 10 619
optcarrot 10 10 10 10 10 11 10 12
protoboeuf 10 170 10 174 10 672 10 779
protoboeuf-encode 10 167 10 190 10 355 10 834
rack 10 565 10 611 10 965 10 1113
ruby-json 10 81 10 84 10 92 10 95
rubykon 10 16 10 16 10 44 10 49
sudoku 10 43 10 43 10 210 10 218
tinygql 10 31 10 32 10 65 10 66
30k_ifelse 10 23 10 23 10 255 10 234
30k_methods 10 34 10 33 10 525 10 515
cfunc_itself 10 332 10 335 10 1086 10 1176
fib 10 123 10 120 10 940 10 1002
getivar 10 213 10 206 10 2333 10 2652
keyword_args 10 98 10 98 10 999 10 1271
object-new 10 318 10 265 10 428 10 350
respond_to 10 129 10 132 10 3295 10 4075
ruby-xor 10 230 10 239 10 844 10 1414
setivar 10 355 10 355 10 3160 10 5755
setivar_object 10 363 10 334 10 829 10 934
setivar_young 10 363 10 337 10 829 10 998
str_concat 10 389 10 397 10 1030 10 1235
throw 10 1266 10 1096 10 1696 10 1409

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) 1457959 1175525 214 2301 0 0% 0 0 65.991149
chunky-png (click) 301107 281158 82 1090 1 0% 0 0 31.877925
erubi-rails (click) 1922179 1686618 245 2823 8 0% 0 0 76.84302
hexapdf (click) 1357987 1181812 507 12565 38 0% 0 0 353.778411
liquid-c (click) 494253 417009 119 1859 5 0% 0 0 52.27339
liquid-compile (click) 415809 388503 150 2206 2 0% 0 0 68.129556
liquid-render (click) 611785 499084 136 2473 12 0% 0 0 68.770997
lobsters (click) 8029080 6638181 3087 51782 181 0% 0 0 1731.153002
mail (click) 740629 701650 346 5481 16 0% 0 0 157.315426
psych-load (click) 245131 207743 60 613 3 0% 0 0 19.167737
railsbench (click) 3294606 2771796 1631 16661 41 0% 0 0 474.961644
rubocop (click) 5803585 4943669 2892 52172 110 0% 4 0 1524.708185
ruby-lsp (click) 850271 750973 308 4991 26 0% 0 0 139.315532
sequel (click) 462996 413051 15 125 0 0% 0 0 4.50282
binarytrees (click) 6981 6331 5 51 0 0% 0 0 2.158402
blurhash (click) 38438 31808 20 350 0 0% 0 0 11.086974
erubi (click) 232480 203266 9 108 0 0% 0 0 3.574655
etanni (click) 28241 26371 10 86 0 0% 0 0 2.947043
fannkuchredux (click) 24038 30826 5 257 0 0% 0 0 7.788467
fluentd (click) 379037 305626 11 114 0 0% 0 0 4.280575
graphql (click) 397031 348163 70 700 0 0% 0 0 20.959399
graphql-native (click) 356578 306004 41 275 0 0% 0 0 8.903305
lee (click) 259661 233336 33 567 0 0% 0 0 17.284897
matmul (click) 7323 8338 6 76 0 0% 0 0 2.555391
nbody (click) 15428 19810 9 201 0 0% 0 0 5.362693
nqueens (click) 21155 28164 7 247 0 0% 0 0 7.296038
optcarrot (click) 324183 308580 186 4508 34 0% 0 0 102.723958
protoboeuf (click) 163936 155521 15 1615 0 0% 0 0 46.500826
protoboeuf-encode (click) 235128 231105 17 1254 0 0% 0 0 32.222576
rack (click) 245768 225626 36 417 0 0% 0 0 11.108093
ruby-json (click) 27728 24458 11 193 0 0% 0 0 5.630473
rubykon (click) 137360 133862 132 1535 3 0% 0 0 43.700515
sudoku (click) 44908 40454 6 507 0 0% 0 0 14.982154
tinygql (click) 269221 236671 57 743 5 0% 0 0 20.872665
30k_ifelse (click) 6316209 5792190 9262 56478 0 0% 0 0 1585.339838
30k_methods (click) 2236110 1594189 5781 19364 0 0% 0 0 453.643503
cfunc_itself (click) 6912 5554 7 62 0 0% 0 0 1.975935
fib (click) 4041 4120 5 37 0 0% 0 0 1.404999
getivar (click) 5037 6014 6 64 0 0% 0 0 1.924178
keyword_args (click) 8181 6507 8 65 0 0% 0 0 2.224686
object-new (click) 3469 3394 5 35 0 0% 0 0 1.375168
respond_to (click) 9866 2524 7 100 0 0% 0 0 2.960063
ruby-xor (click) 6981 7365 7 77 0 0% 0 0 2.45686
setivar (click) 4188 4690 6 44 0 0% 0 0 1.587249
setivar_object (click) 4717 4838 6 46 0 0% 0 0 1.702059
setivar_young (click) 5427 5560 7 54 0 0% 0 0 1.898125
str_concat (click) 7646 7893 9 81 0 0% 0 0 2.617627
throw (click) 7384 5592 8 59 0 0% 0 0 2.118563

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.