YJIT Benchmarks

Details for Benchmarks at 2024-11-16 03:46:30 UTC

YJIT metrics from the yjit-bench suite using Ruby 421fecbbfa

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 92.3% faster than CRuby 3.4.0dev
  • 5.4% faster than YJIT 3.3.4
On railsbench it is
  • 94.9% 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 82 5 83 50 159 50 163
chunky-png 5 31 5 32 50 15 50 34
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 411 5 426 50 569 50 626
liquid-compile 5 413 5 410 50 584 50 559
liquid-render 5 170 5 170 50 401 50 433
lobsters 5 20 5 19 50 10 50 10
mail 5 194 5 178 50 237 50 252
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 156 5 154 50 251 50 261
ruby-lsp 5 157 5 140 50 237 50 264
sequel 5 431 5 420 50 601 50 591
binarytrees 5 84 5 84 50 146 50 153
blurhash 5 82 5 82 50 127 50 140
erubi 5 120 5 148 50 33 50 145
etanni 5 90 5 99 50 52 50 70
fannkuchredux 5 52 5 54 50 99 50 109
fluentd 5 61 5 63 50 22 50 30
graphql 5 85 5 86 50 57 50 55
graphql-native 5 40 5 53 50 10 50 14
lee 5 23 5 22 50 10 50 10
matmul 5 51 5 48 50 88 50 99
nbody 5 248 5 248 50 595 50 716
nqueens 5 119 5 119 50 74 50 558
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 173 5 175 50 616 50 727
protoboeuf-encode 5 178 5 198 50 329 50 837
rack 5 582 5 632 50 961 50 1058
ruby-json 5 84 5 84 50 50 50 50
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 48 50 163 50 162
tinygql 5 37 5 36 50 24 50 26
30k_ifelse 5 28 5 28 50 214 50 193
30k_methods 5 39 5 38 50 477 50 473
cfunc_itself 5 338 5 339 50 1046 50 1136
fib 5 126 5 126 50 901 50 963
getivar 5 208 5 220 50 2267 50 2616
keyword_args 5 105 5 103 50 959 50 1231
object-new 5 320 5 318 50 407 50 387
respond_to 5 137 5 137 50 3257 50 4030
ruby-xor 5 241 5 248 50 804 50 1381
setivar 5 360 5 358 50 3124 50 5705
setivar_object 5 374 5 338 50 772 50 845
setivar_young 5 373 5 343 50 772 50 846
str_concat 5 397 5 380 50 988 50 1201
throw 5 1268 5 1319 50 1727 50 1737

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) 1468770 1257407 213 2351 0 0% 0 0 68.140452
chunky-png (click) 308702 232809 87 1217 1 0% 0 0 36.073149
erubi-rails (click) 1968268 1665418 263 3073 19 0% 0 0 83.106678
hexapdf (click) 1506315 1289414 598 13939 41 0% 0 0 397.914531
liquid-c (click) 489202 455499 119 1852 5 0% 0 0 51.912805
liquid-compile (click) 418160 370303 150 2190 2 0% 0 0 66.736139
liquid-render (click) 600434 524285 136 2474 12 0% 0 0 69.454469
lobsters (click) 8404727 7110831 3214 54891 190 0% 0 0 1875.875431
mail (click) 753701 643656 346 5581 16 0% 0 0 160.468708
psych-load (click) 287310 252553 64 656 3 0% 0 0 20.120147
railsbench (click) 3367516 2732959 1646 17004 52 0% 0 0 497.197155
rubocop (click) 5856685 5041530 2891 52437 110 0% 4 0 1550.759108
ruby-lsp (click) 856700 763979 309 5005 26 0% 0 0 140.334079
sequel (click) 461861 407088 15 124 0 0% 0 0 4.315243
binarytrees (click) 9627 8546 8 75 0 0% 0 0 3.062094
blurhash (click) 57136 49713 29 501 0 0% 0 0 16.080233
erubi (click) 226146 217255 8 113 0 0% 0 0 3.762275
etanni (click) 32243 30528 9 94 0 0% 0 0 3.21587
fannkuchredux (click) 24038 30826 5 257 0 0% 0 0 7.674114
fluentd (click) 382890 327147 10 109 0 0% 0 0 3.795691
graphql (click) 404920 334799 69 695 0 0% 0 0 20.875831
graphql-native (click) 379991 344684 40 270 0 0% 0 0 8.59785
lee (click) 281832 242664 48 841 0 0% 0 0 25.848159
matmul (click) 11838 4563 10 119 0 0% 0 0 3.919115
nbody (click) 14884 19325 8 196 0 0% 0 0 5.087668
nqueens (click) 21155 28164 7 247 0 0% 0 0 7.208129
optcarrot (click) 327944 312320 190 4549 34 0% 0 0 106.323148
protoboeuf (click) 163392 155036 14 1610 0 0% 0 0 45.876105
protoboeuf-encode (click) 234584 230620 16 1249 0 0% 0 0 32.110372
rack (click) 236934 201875 36 417 0 0% 0 0 10.980216
ruby-json (click) 27119 23942 10 187 0 0% 0 0 5.404864
rubykon (click) 142198 122470 139 1584 3 0% 0 0 45.189745
sudoku (click) 48052 35463 9 538 0 0% 0 0 15.940069
tinygql (click) 274750 234134 61 787 5 0% 0 0 22.23324
30k_ifelse (click) 6315665 5791705 9261 56473 0 0% 0 0 1546.8776
30k_methods (click) 2235566 1593704 5780 19359 0 0% 0 0 446.213056
cfunc_itself (click) 6912 5554 7 62 0 0% 0 0 2.001413
fib (click) 4041 4120 5 37 0 0% 0 0 1.423306
getivar (click) 5037 6014 6 64 0 0% 0 0 1.878187
keyword_args (click) 7637 6022 7 60 0 0% 0 0 2.08463
object-new (click) 3469 3394 5 35 0 0% 0 0 1.358379
respond_to (click) 9322 2039 6 95 0 0% 0 0 2.76673
ruby-xor (click) 6297 6740 6 72 0 0% 0 0 2.215026
setivar (click) 4188 4690 6 44 0 0% 0 0 1.569621
setivar_object (click) 4717 4838 6 46 0 0% 0 0 1.677909
setivar_young (click) 5427 5560 7 54 0 0% 0 0 1.911793
str_concat (click) 7646 7893 9 81 0 0% 0 0 2.70169
throw (click) 7384 5592 8 59 0 0% 0 0 2.109517

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.