YJIT Benchmarks

Details for Benchmarks at 2024-09-11 00:28:55 UTC

YJIT metrics from the yjit-bench suite using Ruby 4e6091ce09

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 75.3% faster than CRuby 3.4.0dev
  • 2.8% faster than YJIT 3.3.4
On railsbench it is
  • 80.7% faster than CRuby 3.4.0dev
  • 1.5% 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 56 10 142 10 145
chunky-png 10 18 10 17 10 36 10 40
erubi-rails 10 10 10 10 10 23 10 22
hexapdf 10 10 10 10 10 10 10 10
liquid-c 10 341 10 343 10 486 10 508
liquid-compile 10 345 10 338 10 528 10 500
liquid-render 10 138 10 134 10 356 10 365
lobsters 10 13 10 13 10 24 10 23
mail 10 159 10 160 10 238 10 231
psych-load 10 10 10 10 10 10 10 10
railsbench 10 10 10 10 10 10 10 10
ruby-lsp 10 127 10 125 10 211 10 226
sequel 10 317 10 318 10 425 10 445
binarytrees 10 51 10 51 10 118 10 114
blurhash 10 62 10 63 10 120 10 143
erubi 10 80 10 101 10 105 10 130
etanni 10 60 10 69 10 69 10 80
fannkuchredux 10 10 10 10 10 17 10 18
fluentd 10 10 10 10 10 10 10 10
graphql 10 10 10 10 10 10 10 10
graphql-native 10 29 10 40 10 34 10 46
lee 10 11 10 12 10 20 10 21
matmul 10 10 10 10 10 15 10 17
nbody 10 203 10 206 10 421 10 525
nqueens 10 113 10 113 10 113 10 454
optcarrot 10 10 10 10 10 10 10 10
protoboeuf 10 158 10 156 10 582 10 678
protoboeuf-encode 10 132 10 164 10 294 10 650
rack 10 461 10 464 10 827 10 924
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 22 10 52 10 51
30k_ifelse 10 10 10 10 10 70 10 63
30k_methods 10 10 10 10 10 26 10 26
cfunc_itself 10 248 10 257 10 1108 10 1211
fib 10 102 10 102 10 616 10 623
getivar 10 214 10 224 10 1253 10 1732
keyword_args 10 90 10 88 10 730 10 947
object-new 10 230 10 186 10 308 10 230
respond_to 10 91 10 91 10 1784 10 2216
ruby-xor 10 29 10 31 10 92 10 180
setivar 10 348 10 382 10 2320 10 3104
setivar_object 10 215 10 235 10 536 10 620
setivar_young 10 216 10 234 10 528 10 619
str_concat 10 320 10 342 10 658 10 693
throw 10 971 10 798 10 1345 10 1005

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) 1479445 1224321 214 2301 0 0% 0 0 80.797924
chunky-png (click) 296323 260466 82 1090 1 0% 0 0 37.514073
erubi-rails (click) 1929005 1616679 245 2798 8 0% 0 0 89.115102
hexapdf (click) 1392880 1219611 507 12607 40 0% 0 0 435.394949
liquid-c (click) 494403 433126 118 1858 5 0% 0 0 60.671146
liquid-compile (click) 417928 360561 150 2204 2 0% 0 0 77.986411
liquid-render (click) 636359 520385 135 2475 12 0% 0 0 81.242499
lobsters (click) 8055749 6686549 3086 51751 181 0% 0 0 2063.172829
mail (click) 741192 611439 346 5490 16 0% 0 0 186.316439
psych-load (click) 257562 235440 60 613 3 0% 0 0 22.448579
railsbench (click) 3314672 2866469 1631 16712 41 0% 0 0 566.827988
ruby-lsp (click) 883655 778596 308 4988 26 0% 0 0 170.854966
sequel (click) 499114 436726 15 116 0 0% 0 0 5.207263
binarytrees (click) 9627 8546 8 75 0 0% 0 0 3.612767
blurhash (click) 57136 49713 29 501 0 0% 0 0 20.024589
erubi (click) 221542 192661 9 108 0 0% 0 0 4.263333
etanni (click) 28241 26371 10 86 0 0% 0 0 3.318723
fannkuchredux (click) 22545 29447 3 240 0 0% 0 0 9.296956
fluentd (click) 338990 294373 3 22 0 0% 0 0 1.025811
graphql (click) 421951 376520 65 649 0 0% 0 0 23.109755
graphql-native (click) 380776 317024 41 275 0 0% 0 0 10.487595
lee (click) 282849 227891 33 567 0 0% 0 0 20.89428
matmul (click) 7323 8338 6 76 0 0% 0 0 2.939702
nbody (click) 15399 19810 9 201 0 0% 0 0 6.398734
nqueens (click) 21699 28649 8 252 0 0% 0 0 9.350025
optcarrot (click) 324183 308580 186 4508 34 0% 0 0 121.074319
protoboeuf (click) 163936 155521 15 1615 0 0% 0 0 57.179524
protoboeuf-encode (click) 235128 231105 17 1254 0 0% 0 0 38.849982
rack (click) 240636 214510 36 457 0 0% 0 0 14.377623
ruby-json (click) 24330 21342 6 159 0 0% 0 0 5.206515
rubykon (click) 140687 120490 135 1573 3 0% 0 0 52.318755
sudoku (click) 44903 40454 6 507 0 0% 0 0 18.804501
tinygql (click) 273193 215099 57 743 5 0% 0 0 24.938987
30k_ifelse (click) 6312890 5789092 9257 56443 0 0% 0 0 1908.340524
30k_methods (click) 2232791 1591091 5776 19329 0 0% 0 0 544.308577
cfunc_itself (click) 6912 5554 7 62 0 0% 0 0 2.297422
fib (click) 4585 4605 6 42 0 0% 0 0 1.892359
getivar (click) 5037 6014 6 64 0 0% 0 0 2.202658
keyword_args (click) 8181 6507 8 65 0 0% 0 0 2.744329
object-new (click) 3469 3394 5 35 0 0% 0 0 1.836987
respond_to (click) 9866 2524 7 100 0 0% 0 0 3.637673
ruby-xor (click) 4619 5278 3 52 0 0% 0 0 1.714329
setivar (click) 4188 4690 6 44 0 0% 0 0 1.786308
setivar_object (click) 4717 4838 6 46 0 0% 0 0 1.946346
setivar_young (click) 5427 5560 7 54 0 0% 0 0 2.172595
str_concat (click) 7646 7893 9 81 0 0% 0 0 3.181006
throw (click) 7384 5592 8 59 0 0% 0 0 2.422508

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.