YJIT Benchmarks

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

YJIT metrics from the yjit-bench suite using Ruby a6383fbe16

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 73.1% faster than CRuby 3.4.0dev
  • 3.5% faster than YJIT 3.3.4
On railsbench it is
  • 79.7% faster than CRuby 3.4.0dev
  • 3.1% 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 58 10 59 10 146 10 155
chunky-png 10 18 10 17 10 36 10 40
erubi-rails 10 10 10 10 10 22 10 23
hexapdf 10 10 10 10 10 10 10 10
liquid-c 10 339 10 355 10 499 10 520
liquid-compile 10 344 10 349 10 503 10 511
liquid-render 10 138 10 135 10 355 10 373
lobsters 10 13 10 13 10 24 10 23
mail 10 158 10 162 10 232 10 234
psych-load 10 10 10 10 10 10 10 10
railsbench 10 10 10 10 10 10 10 10
rubocop 10 135 10 133 10 235 10 235
ruby-lsp 10 127 10 128 10 222 10 214
sequel 10 320 10 325 10 426 10 447
binarytrees 10 51 10 49 10 118 10 107
blurhash 10 62 10 62 10 120 10 142
erubi 10 84 10 96 10 106 10 126
etanni 10 60 10 69 10 69 10 80
fannkuchredux 10 59 10 58 10 123 10 125
fluentd 10 38 10 37 10 42 10 41
graphql 10 61 10 62 10 74 10 76
graphql-native 10 29 10 40 10 33 10 47
lee 10 11 10 12 10 19 10 21
matmul 10 38 10 36 10 72 10 77
nbody 10 203 10 202 10 421 10 502
nqueens 10 112 10 101 10 114 10 421
optcarrot 10 10 10 10 10 10 10 10
protoboeuf 10 157 10 159 10 582 10 642
protoboeuf-encode 10 133 10 164 10 294 10 658
rack 10 462 10 481 10 839 10 912
ruby-json 10 64 10 66 10 76 10 78
rubykon 10 13 10 13 10 37 10 39
sudoku 10 48 10 46 10 139 10 147
tinygql 10 23 10 24 10 51 10 53
30k_ifelse 10 26 10 26 10 230 10 207
30k_methods 10 32 10 32 10 343 10 343
cfunc_itself 10 249 10 263 10 1108 10 1211
fib 10 102 10 99 10 616 10 623
getivar 10 215 10 224 10 1253 10 1734
keyword_args 10 90 10 90 10 730 10 947
object-new 10 229 10 189 10 309 10 239
respond_to 10 91 10 93 10 1786 10 2216
ruby-xor 10 186 10 193 10 497 10 917
setivar 10 348 10 400 10 2319 10 3113
setivar_object 10 216 10 225 10 536 10 485
setivar_young 10 216 10 227 10 528 10 490
str_concat 10 319 10 339 10 659 10 741
throw 10 967 10 831 10 1339 10 1031

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) 1466932 1270834 214 2301 0 0% 0 0 75.829155
chunky-png (click) 305776 270032 82 1090 1 0% 0 0 35.800639
erubi-rails (click) 1921698 1690820 246 2812 8 0% 0 0 86.990331
hexapdf (click) 1375134 1147864 507 12565 37 0% 0 0 399.493015
liquid-c (click) 509278 430151 119 1863 5 0% 0 0 57.739025
liquid-compile (click) 440593 363775 150 2205 2 0% 0 0 74.61243
liquid-render (click) 617372 554255 136 2473 12 0% 0 0 76.768843
lobsters (click) 8041975 6671522 3088 51846 181 0% 0 0 1929.315791
mail (click) 734654 670816 346 5481 16 0% 0 0 177.717328
psych-load (click) 254743 224184 60 613 3 0% 0 0 21.343632
railsbench (click) 3327455 2817912 1631 16665 41 0% 0 0 532.282915
rubocop (click) 5832083 4942116 2892 52121 110 0% 4 0 1703.297477
ruby-lsp (click) 869752 767820 308 4991 26 0% 0 0 157.751012
sequel (click) 462054 381239 15 121 0 0% 0 0 4.857512
binarytrees (click) 9627 8546 8 75 0 0% 0 0 3.399231
blurhash (click) 57136 49713 29 501 0 0% 0 0 18.719089
erubi (click) 237149 192060 9 108 0 0% 0 0 4.168806
etanni (click) 28241 26371 10 86 0 0% 0 0 3.236527
fannkuchredux (click) 24582 31311 6 262 0 0% 0 0 9.00333
fluentd (click) 351437 281854 11 114 0 0% 0 0 4.512727
graphql (click) 392694 337039 70 700 0 0% 0 0 23.700833
graphql-native (click) 394278 319658 41 275 0 0% 0 0 9.971378
lee (click) 257174 223596 33 567 0 0% 0 0 19.704124
matmul (click) 7323 8338 6 76 0 0% 0 0 2.961543
nbody (click) 15428 19810 9 201 0 0% 0 0 6.111964
nqueens (click) 21699 28649 8 252 0 0% 0 0 8.852849
optcarrot (click) 324183 308580 186 4508 34 0% 0 0 115.104462
protoboeuf (click) 163936 155521 15 1615 0 0% 0 0 53.503752
protoboeuf-encode (click) 235128 231105 17 1254 0 0% 0 0 37.005614
rack (click) 240479 213716 36 417 0 0% 0 0 12.666259
ruby-json (click) 21877 19055 11 192 0 0% 0 0 6.334848
rubykon (click) 135726 115935 132 1521 3 0% 0 0 48.770152
sudoku (click) 44908 40454 6 507 0 0% 0 0 17.330488
tinygql (click) 282264 256340 57 743 5 0% 0 0 23.908851
30k_ifelse (click) 6316209 5792190 9262 56478 0 0% 0 0 1848.169817
30k_methods (click) 2236110 1594189 5781 19364 0 0% 0 0 534.586415
cfunc_itself (click) 6912 5554 7 62 0 0% 0 0 2.298768
fib (click) 4585 4605 6 42 0 0% 0 0 1.862627
getivar (click) 5037 6014 6 64 0 0% 0 0 2.091786
keyword_args (click) 8181 6507 8 65 0 0% 0 0 2.613633
object-new (click) 3469 3394 5 35 0 0% 0 0 1.639086
respond_to (click) 9866 2524 7 100 0 0% 0 0 3.444935
ruby-xor (click) 6981 7365 7 77 0 0% 0 0 2.840237
setivar (click) 4188 4690 6 44 0 0% 0 0 1.748242
setivar_object (click) 4717 4838 6 46 0 0% 0 0 1.863052
setivar_young (click) 5427 5560 7 54 0 0% 0 0 2.106522
str_concat (click) 7646 7893 9 81 0 0% 0 0 3.2532
throw (click) 7384 5592 8 59 0 0% 0 0 2.377005

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.