YJIT Benchmarks

Details for Benchmarks at 2024-10-16 22:36:07 UTC

YJIT metrics from the yjit-bench suite using Ruby 36b7ad3caa

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 90.6% faster than CRuby 3.4.0dev
  • 6.5% faster than YJIT 3.3.4
On railsbench it is
  • 98.0% faster than CRuby 3.4.0dev
  • 4.0% 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 5 83 5 83 30 177 30 182
chunky-png 5 31 5 31 30 35 30 42
erubi-rails 5 16 5 15 30 15 30 18
hexapdf 5 10 5 10 30 10 30 10
liquid-c 5 423 5 426 30 608 30 646
liquid-compile 5 422 5 427 30 564 30 618
liquid-render 5 171 5 169 30 425 30 459
lobsters 5 20 5 20 30 10 30 10
mail 5 194 5 194 30 272 30 274
psych-load 5 10 5 10 30 10 30 10
railsbench 5 10 5 10 30 10 30 10
rubocop 5 156 5 154 30 269 30 286
ruby-lsp 5 155 5 152 30 262 30 284
sequel 5 433 5 430 30 597 30 619
binarytrees 5 84 5 83 30 170 30 169
blurhash 5 84 5 84 30 147 30 166
erubi 5 103 5 137 30 114 30 139
etanni 5 90 5 100 30 72 30 83
fannkuchredux 5 53 5 55 30 128 30 133
fluentd 5 63 5 61 30 43 30 48
graphql 5 87 5 89 30 80 30 82
graphql-native 5 40 5 51 30 19 30 33
lee 5 23 5 23 30 10 30 10
matmul 5 54 5 54 30 109 30 116
nbody 5 269 5 273 30 649 30 759
nqueens 5 117 5 121 30 92 30 607
optcarrot 5 10 5 10 30 10 30 10
protoboeuf 5 175 5 180 30 652 30 769
protoboeuf-encode 5 172 5 198 30 333 30 805
rack 5 574 5 633 30 953 30 1097
ruby-json 5 85 5 89 30 72 30 76
rubykon 5 21 5 21 30 23 30 29
sudoku 5 48 5 48 30 190 30 195
tinygql 5 36 5 37 30 46 30 47
30k_ifelse 5 28 5 28 30 234 30 214
30k_methods 5 39 5 38 30 504 30 497
cfunc_itself 5 337 5 341 30 1066 30 1156
fib 5 128 5 127 30 920 30 982
getivar 5 219 5 205 30 2313 30 2611
keyword_args 5 103 5 105 30 979 30 1251
object-new 5 322 5 271 30 411 30 328
respond_to 5 136 5 138 30 3274 30 4060
ruby-xor 5 237 5 249 30 824 30 1398
setivar 5 365 5 358 30 3152 30 5729
setivar_object 5 368 5 340 30 808 30 914
setivar_young 5 370 5 345 30 808 30 976
str_concat 5 392 5 391 30 1017 30 1208
throw 5 1272 5 1134 30 1663 30 1491

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) 1453344 1249550 213 2296 0 0% 0 0 65.747734
chunky-png (click) 299057 276781 86 1133 1 0% 0 0 33.822371
erubi-rails (click) 1918091 1650847 248 2870 8 0% 0 0 76.761567
hexapdf (click) 1500521 1255411 597 13847 41 0% 0 0 393.695943
liquid-c (click) 507816 413424 119 1859 5 0% 0 0 52.508671
liquid-compile (click) 413654 378994 150 2205 2 0% 0 0 67.217901
liquid-render (click) 606531 548785 136 2473 12 0% 0 0 69.74638
lobsters (click) 8287679 6967015 3187 53985 182 0% 0 0 1811.663455
mail (click) 743562 653137 346 5481 16 0% 0 0 159.680564
psych-load (click) 283341 248509 64 656 3 0% 0 0 20.838126
railsbench (click) 3323289 2812318 1632 16675 41 0% 0 0 475.683848
rubocop (click) 5814323 4974063 2891 52188 110 0% 4 0 1515.906453
ruby-lsp (click) 856993 672097 308 4986 26 0% 0 0 139.532328
sequel (click) 479582 427902 15 114 0 0% 0 0 4.061353
binarytrees (click) 9627 8546 8 75 0 0% 0 0 3.110128
blurhash (click) 57136 49713 29 501 0 0% 0 0 16.246169
erubi (click) 217488 183519 9 108 0 0% 0 0 3.612062
etanni (click) 28241 26371 10 86 0 0% 0 0 2.955331
fannkuchredux (click) 24038 30826 5 257 0 0% 0 0 7.772463
fluentd (click) 345166 270067 10 109 0 0% 0 0 3.944513
graphql (click) 424459 346882 70 700 0 0% 0 0 20.754348
graphql-native (click) 360257 317629 40 270 0 0% 0 0 8.647701
lee (click) 285871 253072 48 803 0 0% 0 0 24.822467
matmul (click) 11838 4563 10 119 0 0% 0 0 4.019713
nbody (click) 15428 19810 9 201 0 0% 0 0 5.356926
nqueens (click) 21155 28164 7 247 0 0% 0 0 7.313712
optcarrot (click) 327944 312320 190 4549 34 0% 0 0 105.095959
protoboeuf (click) 163936 155521 15 1615 0 0% 0 0 46.444404
protoboeuf-encode (click) 234584 230620 16 1249 0 0% 0 0 32.257275
rack (click) 239195 192267 36 417 0 0% 0 0 11.089094
ruby-json (click) 26083 22457 11 192 0 0% 0 0 5.571592
rubykon (click) 141526 121537 138 1576 3 0% 0 0 45.088569
sudoku (click) 48090 43120 9 536 0 0% 0 0 16.07934
tinygql (click) 263984 233778 61 787 5 0% 0 0 22.278192
30k_ifelse (click) 6315665 5791705 9261 56473 0 0% 0 0 1577.07136
30k_methods (click) 2236110 1594189 5781 19364 0 0% 0 0 453.629393
cfunc_itself (click) 6912 5554 7 62 0 0% 0 0 1.990669
fib (click) 4041 4120 5 37 0 0% 0 0 1.429143
getivar (click) 5037 6014 6 64 0 0% 0 0 1.926587
keyword_args (click) 7637 6022 7 60 0 0% 0 0 2.120072
object-new (click) 3469 3394 5 35 0 0% 0 0 1.370558
respond_to (click) 9866 2524 7 100 0 0% 0 0 2.955541
ruby-xor (click) 6981 7365 7 77 0 0% 0 0 2.489948
setivar (click) 4188 4690 6 44 0 0% 0 0 1.586001
setivar_object (click) 4717 4838 6 46 0 0% 0 0 1.813533
setivar_young (click) 5427 5560 7 54 0 0% 0 0 1.907252
str_concat (click) 7646 7893 9 81 0 0% 0 0 2.735674
throw (click) 7384 5592 8 59 0 0% 0 0 2.16543

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.