YJIT Benchmarks

Details for Benchmarks at 2024-09-25 14:41:13 UTC

YJIT metrics from the yjit-bench suite using Ruby ecbc4a67c9

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 75.5% faster than CRuby 3.4.0dev
  • 3.7% faster than YJIT 3.3.4
On railsbench it is
  • 76.8% faster than CRuby 3.4.0dev
  • 1.4% 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 58 10 144 10 150
chunky-png 10 18 10 18 10 35 10 40
erubi-rails 10 10 10 10 10 23 10 22
hexapdf 10 10 10 10 10 10 10 10
liquid-c 10 349 10 352 10 496 10 516
liquid-compile 10 345 10 358 10 522 10 509
liquid-render 10 139 10 136 10 354 10 364
lobsters 10 13 10 13 10 24 10 23
mail 10 162 10 160 10 232 10 236
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 233 10 236
ruby-lsp 10 127 10 114 10 216 10 228
sequel 10 323 10 325 10 439 10 446
binarytrees 10 51 10 52 10 118 10 114
blurhash 10 62 10 63 10 120 10 143
erubi 10 84 10 103 10 105 10 132
etanni 10 59 10 69 10 69 10 82
fannkuchredux 10 10 10 10 10 17 10 17
fluentd 10 10 10 10 10 10 10 10
graphql 10 10 10 10 10 10 10 10
graphql-native 10 29 10 41 10 32 10 48
lee 10 11 10 12 10 20 10 21
matmul 10 10 10 10 10 15 10 16
nbody 10 203 10 216 10 421 10 516
nqueens 10 114 10 114 10 112 10 422
optcarrot 10 10 10 10 10 10 10 10
protoboeuf 10 158 10 156 10 582 10 646
protoboeuf-encode 10 132 10 167 10 294 10 651
rack 10 454 10 497 10 839 10 949
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 29
tinygql 10 23 10 24 10 51 10 55
30k_ifelse 10 10 10 10 10 70 10 62
30k_methods 10 10 10 10 10 26 10 26
cfunc_itself 10 247 10 256 10 1108 10 1212
fib 10 102 10 102 10 616 10 623
getivar 10 214 10 222 10 1247 10 1730
keyword_args 10 89 10 90 10 729 10 948
object-new 10 229 10 192 10 309 10 239
respond_to 10 91 10 92 10 1786 10 2218
ruby-xor 10 30 10 30 10 92 10 170
setivar 10 348 10 407 10 2320 10 3119
setivar_object 10 216 10 237 10 536 10 577
setivar_young 10 216 10 239 10 528 10 579
str_concat 10 319 10 346 10 657 10 698
throw 10 972 10 832 10 1340 10 1045

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) 1464701 1302660 214 2301 0 0% 0 0 80.435779
chunky-png (click) 292236 240846 82 1090 1 0% 0 0 37.234689
erubi-rails (click) 1924952 1570170 246 2792 8 0% 0 0 89.71145
hexapdf (click) 1364677 1187954 507 12572 36 0% 0 0 432.116067
liquid-c (click) 493586 454457 119 1859 5 0% 0 0 60.767608
liquid-compile (click) 426745 394877 150 2206 2 0% 0 0 78.954765
liquid-render (click) 603150 565470 136 2473 12 0% 0 0 81.165367
lobsters (click) 8048241 6663124 3086 51694 182 0% 0 0 2059.136208
mail (click) 759774 683338 346 5489 16 0% 0 0 187.373562
psych-load (click) 252563 239351 60 613 3 0% 0 0 22.160543
railsbench (click) 3319977 2820244 1631 16695 41 0% 0 0 562.882628
rubocop (click) 5810293 5160560 2892 52168 110 0% 4 0 1843.460917
ruby-lsp (click) 848246 784539 308 4987 26 0% 0 0 170.232587
sequel (click) 469579 396656 15 124 0 0% 0 0 5.133179
binarytrees (click) 9627 8546 8 75 0 0% 0 0 3.47439
blurhash (click) 57136 49713 29 501 0 0% 0 0 19.722364
erubi (click) 237045 216907 9 108 0 0% 0 0 4.311175
etanni (click) 28241 26371 10 86 0 0% 0 0 3.293156
fannkuchredux (click) 22572 29447 3 240 0 0% 0 0 9.165371
fluentd (click) 334545 308128 3 22 0 0% 0 0 1.037848
graphql (click) 391081 324887 65 651 0 0% 0 0 22.662
graphql-native (click) 368352 313430 41 275 0 0% 0 0 10.329626
lee (click) 260410 200724 33 567 0 0% 0 0 20.657774
matmul (click) 7323 8338 6 76 0 0% 0 0 3.004457
nbody (click) 15428 19810 9 201 0 0% 0 0 6.319047
nqueens (click) 21699 28649 8 252 0 0% 0 0 9.496871
optcarrot (click) 324183 308580 186 4508 34 0% 0 0 121.395465
protoboeuf (click) 163936 155521 15 1615 0 0% 0 0 56.933603
protoboeuf-encode (click) 235128 231105 17 1254 0 0% 0 0 38.694504
rack (click) 226265 177513 36 417 0 0% 0 0 13.05827
ruby-json (click) 24330 21342 6 159 0 0% 0 0 5.218472
rubykon (click) 140687 120490 135 1573 3 0% 0 0 53.096384
sudoku (click) 44903 40454 6 507 0 0% 0 0 18.466004
tinygql (click) 273149 239821 57 743 5 0% 0 0 24.796643
30k_ifelse (click) 6312890 5789092 9257 56443 0 0% 0 0 1933.349826
30k_methods (click) 2232791 1591091 5776 19329 0 0% 0 0 545.593988
cfunc_itself (click) 6912 5554 7 62 0 0% 0 0 2.283213
fib (click) 4585 4605 6 42 0 0% 0 0 1.856551
getivar (click) 5037 6014 6 64 0 0% 0 0 2.130573
keyword_args (click) 8181 6507 8 65 0 0% 0 0 2.611938
object-new (click) 3469 3394 5 35 0 0% 0 0 1.598712
respond_to (click) 9866 2524 7 100 0 0% 0 0 3.557922
ruby-xor (click) 4619 5278 3 52 0 0% 0 0 1.827317
setivar (click) 4188 4690 6 44 0 0% 0 0 1.736021
setivar_object (click) 4717 4838 6 46 0 0% 0 0 1.868349
setivar_young (click) 5427 5560 7 54 0 0% 0 0 2.139234
str_concat (click) 7646 7893 9 81 0 0% 0 0 3.286725
throw (click) 7384 5592 8 59 0 0% 0 0 2.398002

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.