YJIT Benchmarks

Details for Benchmarks at 2024-10-15 04:00:07 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
  • 76.2% faster than CRuby 3.4.0dev
  • 5.1% faster than YJIT 3.3.4
On railsbench it is
  • 77.1% faster than CRuby 3.4.0dev
  • 3.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 10 56 10 59 10 146 10 154
chunky-png 10 18 10 17 10 35 10 41
erubi-rails 10 10 10 10 10 22 10 23
hexapdf 10 10 10 10 10 10 10 10
liquid-c 10 342 10 354 10 500 10 513
liquid-compile 10 344 10 349 10 499 10 535
liquid-render 10 137 10 137 10 355 10 377
lobsters 10 13 10 13 10 23 10 24
mail 10 158 10 162 10 233 10 235
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 242
ruby-lsp 10 127 10 116 10 217 10 226
sequel 10 325 10 326 10 436 10 444
binarytrees 10 51 10 50 10 118 10 108
blurhash 10 63 10 61 10 120 10 147
erubi 10 83 10 92 10 101 10 101
etanni 10 60 10 63 10 69 10 81
fannkuchredux 10 59 10 58 10 123 10 126
fluentd 10 38 10 42 10 42 10 49
graphql 10 61 10 61 10 75 10 75
graphql-native 10 29 10 40 10 32 10 47
lee 10 11 10 11 10 20 10 21
matmul 10 38 10 35 10 72 10 81
nbody 10 200 10 194 10 421 10 522
nqueens 10 114 10 115 10 113 10 442
optcarrot 10 10 10 10 10 10 10 10
protoboeuf 10 159 10 159 10 582 10 640
protoboeuf-encode 10 133 10 164 10 295 10 659
rack 10 451 10 511 10 826 10 924
ruby-json 10 64 10 66 10 76 10 78
rubykon 10 13 10 12 10 38 10 39
sudoku 10 48 10 48 10 139 10 155
tinygql 10 23 10 23 10 52 10 53
30k_ifelse 10 26 10 26 10 230 10 207
30k_methods 10 32 10 33 10 344 10 339
cfunc_itself 10 249 10 268 10 1108 10 1212
fib 10 102 10 104 10 616 10 623
getivar 10 215 10 229 10 1249 10 1736
keyword_args 10 90 10 90 10 729 10 947
object-new 10 229 10 187 10 308 10 237
respond_to 10 90 10 91 10 1785 10 2218
ruby-xor 10 186 10 190 10 497 10 836
setivar 10 348 10 377 10 2319 10 3102
setivar_object 10 216 10 217 10 536 10 476
setivar_young 10 216 10 219 10 528 10 475
str_concat 10 320 10 338 10 658 10 683
throw 10 970 10 834 10 1340 10 1033

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) 1444906 1262618 214 2301 0 0% 0 0 74.42649
chunky-png (click) 325537 301932 82 1095 1 0% 0 0 35.655195
erubi-rails (click) 1922431 1694763 245 2798 8 0% 0 0 83.780698
hexapdf (click) 1353507 1162100 507 12564 35 0% 0 0 393.219685
liquid-c (click) 487602 444708 119 1859 5 0% 0 0 56.729264
liquid-compile (click) 416595 381313 150 2213 2 0% 0 0 74.787755
liquid-render (click) 610162 489235 136 2473 12 0% 0 0 75.580642
lobsters (click) 8019323 6691049 3087 51679 183 0% 0 0 1889.644943
mail (click) 742113 676858 346 5481 16 0% 0 0 175.399879
psych-load (click) 241194 213004 60 613 3 0% 0 0 21.040912
railsbench (click) 3321800 2835607 1631 16661 41 0% 0 0 522.31003
rubocop (click) 5813163 5047104 2892 52176 110 0% 4 0 1668.909113
ruby-lsp (click) 853211 726741 308 4986 26 0% 0 0 154.958618
sequel (click) 491097 445291 15 125 0 0% 0 0 5.318532
binarytrees (click) 9721 8668 8 76 0 0% 0 0 3.406676
blurhash (click) 57136 49713 29 501 0 0% 0 0 18.583512
erubi (click) 252412 220156 9 108 0 0% 0 0 4.083456
etanni (click) 24711 23355 10 87 0 0% 0 0 3.252595
fannkuchredux (click) 24582 31311 6 262 0 0% 0 0 8.778069
fluentd (click) 345073 277317 11 114 0 0% 0 0 4.258847
graphql (click) 412588 345399 70 700 0 0% 0 0 23.602368
graphql-native (click) 362665 310128 41 275 0 0% 0 0 9.933317
lee (click) 269853 242223 33 567 0 0% 0 0 19.538375
matmul (click) 7323 8338 6 76 0 0% 0 0 2.835132
nbody (click) 15428 19810 9 201 0 0% 0 0 5.926935
nqueens (click) 21699 28649 8 252 0 0% 0 0 8.619309
optcarrot (click) 324183 308580 186 4508 34 0% 0 0 113.037116
protoboeuf (click) 163936 155521 15 1615 0 0% 0 0 52.848056
protoboeuf-encode (click) 235128 231105 17 1254 0 0% 0 0 36.213398
rack (click) 229204 204619 36 417 0 0% 0 0 12.430376
ruby-json (click) 27649 24400 11 194 0 0% 0 0 6.258284
rubykon (click) 135726 115935 132 1521 3 0% 0 0 47.880304
sudoku (click) 44908 40454 6 507 0 0% 0 0 16.932847
tinygql (click) 258869 228970 57 743 5 0% 0 0 23.511698
30k_ifelse (click) 6316209 5792190 9262 56478 0 0% 0 0 1821.470388
30k_methods (click) 2236110 1594189 5781 19364 0 0% 0 0 526.976669
cfunc_itself (click) 6912 5554 7 62 0 0% 0 0 2.237449
fib (click) 4585 4605 6 42 0 0% 0 0 1.79592
getivar (click) 5037 6014 6 64 0 0% 0 0 1.979564
keyword_args (click) 8181 6507 8 65 0 0% 0 0 2.508817
object-new (click) 3469 3394 5 35 0 0% 0 0 1.565365
respond_to (click) 9866 2524 7 100 0 0% 0 0 3.37085
ruby-xor (click) 6981 7365 7 77 0 0% 0 0 2.756831
setivar (click) 4188 4690 6 44 0 0% 0 0 1.65115
setivar_object (click) 4717 4838 6 46 0 0% 0 0 1.813182
setivar_young (click) 5427 5560 7 54 0 0% 0 0 1.982433
str_concat (click) 7646 7893 9 81 0 0% 0 0 3.137332
throw (click) 7384 5592 8 59 0 0% 0 0 2.342454

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.