YJIT Benchmarks

Details for Benchmarks at 2024-09-13 19:30:57 UTC

YJIT metrics from the yjit-bench suite using Ruby ddbd644001

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 76.3% faster than CRuby 3.4.0dev
  • 3.1% faster than YJIT 3.3.4
On railsbench it is
  • 77.4% faster than CRuby 3.4.0dev
  • 2.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 57 10 57 10 151 10 145
chunky-png 10 18 10 17 10 36 10 40
erubi-rails 10 10 10 10 10 22 10 22
hexapdf 10 10 10 10 10 10 10 10
liquid-c 10 341 10 345 10 481 10 504
liquid-compile 10 345 10 346 10 501 10 503
liquid-render 10 139 10 134 10 353 10 363
lobsters 10 13 10 13 10 24 10 23
mail 10 162 10 161 10 238 10 233
psych-load 10 10 10 10 10 10 10 10
railsbench 10 10 10 10 10 10 10 10
ruby-lsp 10 123 10 130 10 214 10 214
binarytrees 10 51 10 51 10 118 10 115
blurhash 10 62 10 62 10 120 10 141
erubi 10 84 10 102 10 101 10 130
etanni 10 60 10 69 10 69 10 81
fannkuchredux 10 10 10 10 10 17 10 20
fluentd 10 10 10 10 10 10 10 10
graphql 10 10 10 10 10 10 10 10
graphql-native 10 28 10 40 10 39 10 46
lee 10 11 10 12 10 20 10 20
matmul 10 10 10 10 10 15 10 18
nbody 10 203 10 198 10 421 10 514
nqueens 10 113 10 116 10 112 10 443
optcarrot 10 10 10 10 10 10 10 10
protoboeuf 10 159 10 154 10 582 10 635
protoboeuf-encode 10 133 10 165 10 293 10 649
rack 10 454 10 499 10 853 10 922
ruby-json 10 10 10 10 10 10 10 10
rubykon 10 10 10 10 10 10 10 10
sudoku 10 10 10 10 10 28 10 32
tinygql 10 23 10 23 10 51 10 51
30k_ifelse 10 10 10 10 10 70 10 62
30k_methods 10 10 10 10 10 26 10 25
cfunc_itself 10 244 10 265 10 1108 10 1211
fib 10 102 10 102 10 616 10 623
getivar 10 214 10 210 10 1252 10 1716
keyword_args 10 90 10 88 10 729 10 947
object-new 10 230 10 187 10 308 10 232
respond_to 10 90 10 89 10 1786 10 2217
ruby-xor 10 30 10 31 10 92 10 168
setivar 10 348 10 365 10 2320 10 3093
setivar_object 10 216 10 218 10 536 10 488
setivar_young 10 215 10 219 10 529 10 487
str_concat 10 320 10 346 10 657 10 655
throw 10 965 10 821 10 1343 10 1043

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) 1454022 1223728 214 2301 0 0% 0 0 80.346724
chunky-png (click) 292136 253866 82 1090 1 0% 0 0 37.32279
erubi-rails (click) 1917037 1660345 245 2819 8 0% 0 0 90.537939
hexapdf (click) 1352301 1191744 507 12572 38 0% 0 0 430.52784
liquid-c (click) 487969 435873 119 1859 5 0% 0 0 60.292217
liquid-compile (click) 413575 345589 150 2207 2 0% 0 0 78.948448
liquid-render (click) 598372 537279 136 2473 12 0% 0 0 81.650201
lobsters (click) 8039347 6841720 3086 51626 182 0% 0 0 2052.399433
mail (click) 740505 650376 346 5489 16 0% 0 0 187.012722
psych-load (click) 238151 191968 60 613 3 0% 0 0 22.255757
railsbench (click) 3319968 2927839 1631 16693 41 0% 0 0 560.753275
ruby-lsp (click) 848358 744149 308 4987 26 0% 0 0 169.368176
binarytrees (click) 9627 8546 8 75 0 0% 0 0 3.400074
blurhash (click) 57136 49713 29 501 0 0% 0 0 19.7093
erubi (click) 223415 184018 9 108 0 0% 0 0 4.164749
etanni (click) 24711 23355 10 87 0 0% 0 0 3.368412
fannkuchredux (click) 22572 29447 3 240 0 0% 0 0 9.136495
fluentd (click) 344166 308418 3 22 0 0% 0 0 1.076914
graphql (click) 387944 328175 65 651 0 0% 0 0 22.924886
graphql-native (click) 358044 296398 41 275 0 0% 0 0 10.267901
lee (click) 259730 232958 33 567 0 0% 0 0 20.734861
matmul (click) 7323 8338 6 76 0 0% 0 0 3.027284
nbody (click) 15428 19810 9 201 0 0% 0 0 6.347191
nqueens (click) 21699 28649 8 252 0 0% 0 0 9.635661
optcarrot (click) 324183 308580 186 4508 34 0% 0 0 121.264148
protoboeuf (click) 163936 155521 15 1615 0 0% 0 0 57.139923
protoboeuf-encode (click) 235128 231105 17 1254 0 0% 0 0 38.499376
rack (click) 236316 222364 36 417 0 0% 0 0 13.013411
ruby-json (click) 18563 16002 6 158 0 0% 0 0 5.219735
rubykon (click) 141083 120769 135 1575 3 0% 0 0 52.984874
sudoku (click) 44903 40454 6 507 0 0% 0 0 18.410195
tinygql (click) 266486 222993 57 743 5 0% 0 0 24.7284
30k_ifelse (click) 6312890 5789092 9257 56443 0 0% 0 0 1917.076333
30k_methods (click) 2232791 1591091 5776 19329 0 0% 0 0 541.632665
cfunc_itself (click) 6912 5554 7 62 0 0% 0 0 2.273322
fib (click) 4585 4605 6 42 0 0% 0 0 1.860661
getivar (click) 5037 6014 6 64 0 0% 0 0 2.107481
keyword_args (click) 8181 6507 8 65 0 0% 0 0 2.532065
object-new (click) 3469 3394 5 35 0 0% 0 0 1.569372
respond_to (click) 9866 2524 7 100 0 0% 0 0 3.503974
ruby-xor (click) 4619 5278 3 52 0 0% 0 0 1.802079
setivar (click) 4188 4690 6 44 0 0% 0 0 1.716418
setivar_object (click) 4717 4838 6 46 0 0% 0 0 1.931594
setivar_young (click) 5427 5560 7 54 0 0% 0 0 2.160087
str_concat (click) 7646 7893 9 81 0 0% 0 0 3.226702
throw (click) 7384 5592 8 59 0 0% 0 0 2.344857

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.