YJIT Benchmarks

Details for Benchmarks at 2024-10-11 04:00:07 UTC

YJIT metrics from the yjit-bench suite using Ruby 09100508e6

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 74.2% faster than CRuby 3.4.0dev
  • 4.5% faster than YJIT 3.3.4
On railsbench it is
  • 79.4% faster than CRuby 3.4.0dev
  • 2.8% 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 56 10 59 10 144 10 153
chunky-png 10 18 10 18 10 36 10 40
erubi-rails 10 10 10 10 10 24 10 22
hexapdf 10 10 10 10 10 10 10 10
liquid-c 10 349 10 353 10 492 10 519
liquid-compile 10 344 10 350 10 502 10 533
liquid-render 10 139 10 137 10 355 10 374
lobsters 10 13 10 13 10 24 10 23
mail 10 162 10 162 10 231 10 233
psych-load 10 10 10 10 10 10 10 10
railsbench 10 10 10 10 10 10 10 10
rubocop 10 135 10 135 10 235 10 240
ruby-lsp 10 127 10 133 10 217 10 219
sequel 10 323 10 321 10 438 10 442
binarytrees 10 50 10 52 10 118 10 114
blurhash 10 62 10 63 10 120 10 148
erubi 10 83 10 100 10 105 10 127
etanni 10 59 10 68 10 69 10 81
fannkuchredux 10 59 10 59 10 123 10 134
fluentd 10 38 10 42 10 43 10 49
graphql 10 61 10 62 10 74 10 76
graphql-native 10 29 10 41 10 33 10 47
lee 10 11 10 12 10 19 10 21
matmul 10 38 10 43 10 72 10 88
nbody 10 203 10 217 10 421 10 551
nqueens 10 113 10 116 10 113 10 450
optcarrot 10 10 10 10 10 10 10 10
protoboeuf 10 158 10 159 10 582 10 639
protoboeuf-encode 10 132 10 167 10 293 10 652
rack 10 458 10 496 10 816 10 927
ruby-json 10 64 10 65 10 76 10 78
rubykon 10 13 10 13 10 37 10 39
sudoku 10 48 10 50 10 139 10 159
tinygql 10 23 10 24 10 51 10 52
30k_ifelse 10 26 10 26 10 230 10 208
30k_methods 10 32 10 33 10 344 10 343
cfunc_itself 10 248 10 249 10 1107 10 1211
fib 10 102 10 102 10 616 10 623
getivar 10 214 10 229 10 1246 10 1736
keyword_args 10 90 10 89 10 729 10 946
object-new 10 230 10 187 10 309 10 234
respond_to 10 91 10 87 10 1785 10 2215
ruby-xor 10 186 10 186 10 497 10 904
setivar 10 348 10 406 10 2320 10 3116
setivar_object 10 216 10 234 10 536 10 494
setivar_young 10 216 10 235 10 528 10 491
str_concat 10 319 10 344 10 657 10 675
throw 10 968 10 816 10 1342 10 1038

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) 1479826 1267256 214 2301 0 0% 0 0 74.807126
chunky-png (click) 325130 285187 82 1095 1 0% 0 0 35.941822
erubi-rails (click) 1937735 1617545 245 2798 8 0% 0 0 84.872057
hexapdf (click) 1352988 1169939 507 12565 35 0% 0 0 398.495155
liquid-c (click) 496510 407829 119 1859 5 0% 0 0 57.327122
liquid-compile (click) 418100 375152 150 2218 2 0% 0 0 75.613043
liquid-render (click) 636405 553045 136 2473 12 0% 0 0 77.601465
lobsters (click) 8050614 6677688 3087 51831 183 0% 0 0 1904.714419
mail (click) 778682 699490 346 5481 16 0% 0 0 177.916534
psych-load (click) 251796 234334 60 615 3 0% 0 0 21.438208
railsbench (click) 3323872 2804581 1631 16680 41 0% 0 0 527.955735
rubocop (click) 5842650 5116490 2894 52206 111 0% 4 0 1689.214149
ruby-lsp (click) 864288 714181 308 4991 26 0% 0 0 157.00653
sequel (click) 460764 403891 15 113 0 0% 0 0 4.467652
binarytrees (click) 9627 8546 8 75 0 0% 0 0 3.310451
blurhash (click) 57136 49713 29 501 0 0% 0 0 18.611268
erubi (click) 227308 198503 9 108 0 0% 0 0 3.997044
etanni (click) 24711 23355 10 87 0 0% 0 0 3.244945
fannkuchredux (click) 24582 31311 6 262 0 0% 0 0 8.954661
fluentd (click) 349999 297214 11 114 0 0% 0 0 4.349403
graphql (click) 403613 346946 70 700 0 0% 0 0 23.474211
graphql-native (click) 363133 308819 41 275 0 0% 0 0 9.906737
lee (click) 258376 212857 33 567 0 0% 0 0 19.490124
matmul (click) 7323 8338 6 76 0 0% 0 0 2.878886
nbody (click) 15428 19810 9 201 0 0% 0 0 5.97819
nqueens (click) 21699 28649 8 252 0 0% 0 0 8.73762
optcarrot (click) 324183 308580 186 4508 34 0% 0 0 114.457779
protoboeuf (click) 163936 155521 15 1615 0 0% 0 0 53.231579
protoboeuf-encode (click) 235399 223278 17 1254 0 0% 0 0 36.675012
rack (click) 240189 187742 36 417 0 0% 0 0 12.47544
ruby-json (click) 21877 19055 11 192 0 0% 0 0 6.310365
rubykon (click) 135726 115935 132 1521 3 0% 0 0 48.344675
sudoku (click) 44908 40454 6 507 0 0% 0 0 17.204942
tinygql (click) 270110 204253 57 743 5 0% 0 0 23.729453
30k_ifelse (click) 6316209 5792190 9262 56478 0 0% 0 0 1834.804758
30k_methods (click) 2236110 1594189 5781 19364 0 0% 0 0 533.933988
cfunc_itself (click) 6912 5554 7 62 0 0% 0 0 2.258739
fib (click) 4585 4605 6 42 0 0% 0 0 1.789185
getivar (click) 5037 6014 6 64 0 0% 0 0 2.034789
keyword_args (click) 8181 6507 8 65 0 0% 0 0 2.514672
object-new (click) 3469 3394 5 35 0 0% 0 0 1.571092
respond_to (click) 9866 2524 7 100 0 0% 0 0 3.384776
ruby-xor (click) 6981 7365 7 77 0 0% 0 0 2.772145
setivar (click) 4188 4690 6 44 0 0% 0 0 1.689575
setivar_object (click) 4717 4838 6 46 0 0% 0 0 1.892352
setivar_young (click) 5427 5560 7 54 0 0% 0 0 2.123607
str_concat (click) 7646 7893 9 81 0 0% 0 0 3.151111
throw (click) 7384 5592 8 59 0 0% 0 0 2.298249

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.