YJIT Benchmarks

Details for Benchmarks at 2024-11-10 03:44:03 UTC

YJIT metrics from the yjit-bench suite using Ruby 9588319e72

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 86.6% faster than CRuby 3.4.0dev
  • 3.2% faster than YJIT 3.3.4
On railsbench it is
  • 98.1% faster than CRuby 3.4.0dev
  • 3.2% 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 50 155 50 160
chunky-png 5 31 5 32 50 15 50 19
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 422 5 425 50 566 50 614
liquid-compile 5 411 5 407 50 545 50 554
liquid-render 5 167 5 169 50 404 50 429
lobsters 5 20 5 20 50 10 50 10
mail 5 188 5 193 50 251 50 248
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 156 5 155 50 251 50 267
ruby-lsp 5 145 5 142 50 246 50 238
sequel 5 418 5 416 50 597 50 547
binarytrees 5 84 5 83 50 146 50 148
blurhash 5 82 5 83 50 127 50 145
erubi 5 113 5 139 50 85 50 129
etanni 5 90 5 97 50 52 50 60
fannkuchredux 5 52 5 55 50 100 50 105
fluentd 5 61 5 64 50 22 50 30
graphql 5 85 5 85 50 56 50 56
graphql-native 5 41 5 52 50 10 50 14
lee 5 23 5 23 50 10 50 10
matmul 5 51 5 52 50 88 50 98
nbody 5 248 5 260 50 596 50 705
nqueens 5 119 5 119 50 74 50 563
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 172 5 171 50 616 50 669
protoboeuf-encode 5 179 5 200 50 328 50 778
rack 5 579 5 627 50 949 50 1036
ruby-json 5 85 5 82 50 51 50 48
rubykon 5 20 5 21 50 10 50 10
sudoku 5 48 5 49 50 163 50 161
tinygql 5 37 5 37 50 24 50 26
30k_ifelse 5 28 5 28 50 213 50 191
30k_methods 5 38 5 38 50 483 50 476
cfunc_itself 5 339 5 344 50 1046 50 1136
fib 5 127 5 127 50 900 50 963
getivar 5 209 5 210 50 2266 50 2616
keyword_args 5 105 5 104 50 959 50 1231
object-new 5 321 5 319 50 407 50 397
respond_to 5 137 5 139 50 3256 50 4037
ruby-xor 5 241 5 250 50 803 50 1379
setivar 5 359 5 358 50 3124 50 5704
setivar_object 5 374 5 344 50 772 50 844
setivar_young 5 374 5 344 50 773 50 845
str_concat 5 398 5 403 50 997 50 1168
throw 5 1272 5 1253 50 1726 50 1684

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) 1475996 1230376 213 2296 0 0% 0 0 65.735259
chunky-png (click) 298884 268483 86 1133 1 0% 0 0 33.513718
erubi-rails (click) 1916686 1665816 249 2879 8 0% 0 0 78.499812
hexapdf (click) 1520613 1273416 597 13852 40 0% 0 0 396.115637
liquid-c (click) 494484 375718 119 1852 5 0% 0 0 51.751387
liquid-compile (click) 411054 362272 150 2201 2 0% 0 0 68.982583
liquid-render (click) 628526 530175 136 2466 12 0% 0 0 69.664373
lobsters (click) 8308926 6950165 3214 54327 181 0% 0 0 1857.871623
mail (click) 742116 676858 346 5481 16 0% 0 0 158.14831
psych-load (click) 286499 243035 64 656 3 0% 0 0 20.558707
railsbench (click) 3291903 2877987 1633 16700 41 0% 0 0 473.714524
rubocop (click) 5808616 4870668 2891 52124 110 0% 4 0 1518.462986
ruby-lsp (click) 885057 804370 308 4990 26 0% 0 0 139.848203
sequel (click) 493805 398842 15 118 0 0% 0 0 4.375675
binarytrees (click) 9627 8546 8 75 0 0% 0 0 2.990691
blurhash (click) 57136 49713 29 501 0 0% 0 0 15.957328
erubi (click) 253194 245699 9 108 0 0% 0 0 3.761878
etanni (click) 27632 25826 9 85 0 0% 0 0 2.898485
fannkuchredux (click) 24038 30826 5 257 0 0% 0 0 7.655918
fluentd (click) 363193 293184 10 109 0 0% 0 0 3.986775
graphql (click) 398018 337259 69 695 0 0% 0 0 20.482408
graphql-native (click) 356245 313132 40 270 0 0% 0 0 8.54387
lee (click) 281229 272474 48 803 0 0% 0 0 24.576344
matmul (click) 11838 4563 10 119 0 0% 0 0 3.96149
nbody (click) 14884 19325 8 196 0 0% 0 0 5.151793
nqueens (click) 21155 28164 7 247 0 0% 0 0 7.322079
optcarrot (click) 327944 312320 190 4549 34 0% 0 0 105.627155
protoboeuf (click) 163392 155036 14 1610 0 0% 0 0 45.969447
protoboeuf-encode (click) 234584 230620 16 1249 0 0% 0 0 32.064862
rack (click) 268446 244934 36 417 0 0% 0 0 11.000676
ruby-json (click) 27119 23942 10 187 0 0% 0 0 5.359208
rubykon (click) 140297 120385 138 1566 3 0% 0 0 44.754128
sudoku (click) 48090 43120 9 536 0 0% 0 0 15.926433
tinygql (click) 298132 269756 61 787 5 0% 0 0 22.277773
30k_ifelse (click) 6315665 5791705 9261 56473 0 0% 0 0 1566.568547
30k_methods (click) 2235566 1593704 5780 19359 0 0% 0 0 450.843964
cfunc_itself (click) 6912 5554 7 62 0 0% 0 0 1.984246
fib (click) 4041 4120 5 37 0 0% 0 0 1.426542
getivar (click) 5037 6014 6 64 0 0% 0 0 1.891576
keyword_args (click) 7637 6022 7 60 0 0% 0 0 2.091193
object-new (click) 3469 3394 5 35 0 0% 0 0 1.289208
respond_to (click) 9322 2039 6 95 0 0% 0 0 2.766643
ruby-xor (click) 6437 6880 6 72 0 0% 0 0 2.2248
setivar (click) 4188 4690 6 44 0 0% 0 0 1.607674
setivar_object (click) 4717 4838 6 46 0 0% 0 0 1.687206
setivar_young (click) 5427 5560 7 54 0 0% 0 0 1.899984
str_concat (click) 7646 7893 9 81 0 0% 0 0 2.658271
throw (click) 7384 5592 8 59 0 0% 0 0 2.141665

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.