YJIT Benchmarks

Details for Benchmarks at 2024-09-11 20:41:46 UTC

YJIT metrics from the yjit-bench suite using Ruby 5d358b660d

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 72.1% faster than CRuby 3.4.0dev
  • 2.7% faster than YJIT 3.3.4
On railsbench it is
  • 81.7% faster than CRuby 3.4.0dev
  • 1.3% 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 56 10 58 10 146 10 151
chunky-png 10 18 10 18 10 35 10 39
erubi-rails 10 10 10 10 10 22 10 22
hexapdf 10 10 10 10 10 10 10 10
liquid-c 10 349 10 348 10 488 10 511
liquid-compile 10 344 10 338 10 500 10 496
liquid-render 10 139 10 134 10 354 10 366
lobsters 10 13 10 13 10 24 10 23
mail 10 161 10 159 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 129 10 130 10 209 10 211
sequel 10 325 10 317 10 435 10 440
binarytrees 10 51 10 49 10 118 10 114
blurhash 10 62 10 62 10 120 10 147
erubi 10 83 10 100 10 106 10 129
etanni 10 60 10 68 10 69 10 80
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 29 10 41 10 32 10 48
lee 10 11 10 12 10 19 10 21
matmul 10 10 10 10 10 15 10 18
nbody 10 203 10 212 10 421 10 516
nqueens 10 112 10 117 10 112 10 444
optcarrot 10 10 10 10 10 10 10 10
protoboeuf 10 157 10 155 10 536 10 676
protoboeuf-encode 10 132 10 167 10 293 10 647
rack 10 457 10 469 10 843 10 871
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 250 10 262 10 1108 10 1213
fib 10 102 10 99 10 616 10 623
getivar 10 214 10 258 10 1249 10 1761
keyword_args 10 90 10 90 10 730 10 949
object-new 10 229 10 188 10 308 10 233
respond_to 10 91 10 91 10 1785 10 2219
ruby-xor 10 30 10 31 10 92 10 158
setivar 10 348 10 414 10 2319 10 3122
setivar_object 10 216 10 258 10 536 10 627
setivar_young 10 216 10 258 10 528 10 625
str_concat 10 319 10 348 10 658 10 659
throw 10 970 10 817 10 1340 10 1041

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) 1453368 1223664 214 2301 0 0% 0 0 81.365274
chunky-png (click) 294253 242237 82 1090 1 0% 0 0 37.805553
erubi-rails (click) 1952813 1710017 246 2811 8 0% 0 0 90.432523
hexapdf (click) 1392929 1153901 507 12607 40 0% 0 0 434.807998
liquid-c (click) 489503 397149 118 1858 5 0% 0 0 61.202731
liquid-compile (click) 443185 366339 150 2188 2 0% 0 0 77.49191
liquid-render (click) 633653 526561 135 2473 12 0% 0 0 81.208186
lobsters (click) 8056095 6722975 3086 51829 182 0% 0 0 2073.422717
mail (click) 735346 631856 346 5481 16 0% 0 0 188.168767
psych-load (click) 255700 215973 60 613 3 0% 0 0 22.833118
railsbench (click) 3318632 2948017 1631 16762 41 0% 0 0 575.000078
ruby-lsp (click) 849270 731690 308 4986 26 0% 0 0 167.879015
sequel (click) 495723 408547 15 112 0 0% 0 0 4.654756
binarytrees (click) 9627 8546 8 75 0 0% 0 0 3.650206
blurhash (click) 57136 49713 29 501 0 0% 0 0 19.968031
erubi (click) 251805 211419 9 108 0 0% 0 0 4.411142
etanni (click) 24711 23355 10 87 0 0% 0 0 3.408207
fannkuchredux (click) 22545 29447 3 240 0 0% 0 0 9.369522
fluentd (click) 341765 297852 3 22 0 0% 0 0 1.078636
graphql (click) 390553 358040 65 649 0 0% 0 0 23.242265
graphql-native (click) 391734 342173 41 275 0 0% 0 0 10.51157
lee (click) 255212 220777 33 567 0 0% 0 0 20.743377
matmul (click) 7323 8338 6 76 0 0% 0 0 2.974755
nbody (click) 15399 19810 9 201 0 0% 0 0 6.45351
nqueens (click) 21699 28649 8 252 0 0% 0 0 9.316782
optcarrot (click) 324183 308580 186 4508 34 0% 0 0 121.883964
protoboeuf (click) 163936 155521 15 1615 0 0% 0 0 57.547653
protoboeuf-encode (click) 235128 231105 17 1254 0 0% 0 0 39.000985
rack (click) 266766 260471 36 425 0 0% 0 0 13.668679
ruby-json (click) 24330 21342 6 160 0 0% 0 0 5.347343
rubykon (click) 140687 120490 135 1573 3 0% 0 0 52.5148
sudoku (click) 44903 40454 6 507 0 0% 0 0 18.947957
tinygql (click) 298476 278241 57 746 5 0% 0 0 25.332688
30k_ifelse (click) 6312890 5789092 9257 56443 0 0% 0 0 1915.218506
30k_methods (click) 2232791 1591091 5776 19329 0 0% 0 0 545.552145
cfunc_itself (click) 6912 5554 7 62 0 0% 0 0 2.318946
fib (click) 4585 4605 6 42 0 0% 0 0 1.909923
getivar (click) 5037 6014 6 64 0 0% 0 0 2.232908
keyword_args (click) 8181 6507 8 65 0 0% 0 0 2.70714
object-new (click) 3469 3394 5 35 0 0% 0 0 1.945356
respond_to (click) 9866 2524 7 100 0 0% 0 0 3.681491
ruby-xor (click) 4619 5278 3 52 0 0% 0 0 1.76585
setivar (click) 4188 4690 6 44 0 0% 0 0 1.788349
setivar_object (click) 4717 4838 6 46 0 0% 0 0 1.934592
setivar_young (click) 5427 5560 7 54 0 0% 0 0 2.199203
str_concat (click) 7646 7893 9 81 0 0% 0 0 3.222649
throw (click) 7384 5592 8 59 0 0% 0 0 2.457322

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.