YJIT Benchmarks

Details for Benchmarks at 2024-09-17 06:14:59 UTC

YJIT metrics from the yjit-bench suite using Ruby 7d80c139f7

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 76.6% faster than CRuby 3.4.0dev
  • 3.5% faster than YJIT 3.3.4
On railsbench it is
  • 74.3% 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 148 10 148
chunky-png 10 18 10 17 10 35 10 40
erubi-rails 10 10 10 10 10 22 10 23
hexapdf 10 10 10 10 10 10 10 10
liquid-c 10 343 10 347 10 499 10 515
liquid-compile 10 345 10 346 10 500 10 504
liquid-render 10 137 10 134 10 356 10 359
lobsters 10 13 10 13 10 24 10 23
mail 10 161 10 158 10 235 10 230
psych-load 10 10 10 10 10 10 10 10
railsbench 10 10 10 10 10 10 10 10
ruby-lsp 10 129 10 131 10 213 10 226
binarytrees 10 51 10 52 10 118 10 118
blurhash 10 62 10 63 10 120 10 142
erubi 10 80 10 102 10 101 10 129
etanni 10 60 10 69 10 69 10 81
fannkuchredux 10 10 10 10 10 17 10 21
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 32 10 48
lee 10 11 10 12 10 20 10 21
matmul 10 10 10 10 10 15 10 18
nbody 10 203 10 202 10 421 10 534
nqueens 10 113 10 113 10 113 10 439
optcarrot 10 10 10 10 10 10 10 10
protoboeuf 10 159 10 155 10 583 10 640
protoboeuf-encode 10 133 10 164 10 293 10 658
rack 10 458 10 488 10 828 10 921
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 33
tinygql 10 24 10 23 10 51 10 50
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 265 10 1108 10 1211
fib 10 102 10 100 10 616 10 623
getivar 10 214 10 230 10 1253 10 1738
keyword_args 10 86 10 89 10 729 10 947
object-new 10 229 10 188 10 309 10 232
respond_to 10 90 10 88 10 1785 10 2216
ruby-xor 10 30 10 31 10 92 10 164
setivar 10 348 10 389 10 2319 10 3109
setivar_object 10 216 10 219 10 536 10 479
setivar_young 10 216 10 221 10 528 10 475
str_concat 10 320 10 344 10 658 10 664
throw 10 961 10 823 10 1348 10 1028

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) 1449064 1219451 214 2301 0 0% 0 0 80.74911
chunky-png (click) 289950 253846 82 1090 1 0% 0 0 37.327095
erubi-rails (click) 1933859 1642496 245 2791 8 0% 0 0 89.523165
hexapdf (click) 1363322 1141329 508 12574 40 0% 0 0 431.421938
liquid-c (click) 496077 451370 119 1859 5 0% 0 0 60.867685
liquid-compile (click) 413099 361866 150 2210 2 0% 0 0 79.743213
liquid-render (click) 603693 529745 136 2473 12 0% 0 0 81.917101
lobsters (click) 8072749 6722384 3086 51891 181 0% 0 0 2077.058171
mail (click) 738773 616697 346 5489 16 0% 0 0 188.031354
psych-load (click) 255244 249153 60 615 3 0% 0 0 22.447297
railsbench (click) 3336577 2932595 1631 16681 41 0% 0 0 563.270509
ruby-lsp (click) 873133 810838 308 4991 26 0% 0 0 169.706713
binarytrees (click) 9627 8546 8 75 0 0% 0 0 3.448223
blurhash (click) 57136 49713 29 501 0 0% 0 0 19.949112
erubi (click) 224806 213085 9 108 0 0% 0 0 4.21176
etanni (click) 24711 23355 10 87 0 0% 0 0 3.398112
fannkuchredux (click) 22572 29447 3 240 0 0% 0 0 9.163285
fluentd (click) 335056 292219 3 22 0 0% 0 0 1.010597
graphql (click) 400183 318027 65 651 0 0% 0 0 22.964659
graphql-native (click) 392932 318614 41 275 0 0% 0 0 10.285323
lee (click) 260557 225568 33 567 0 0% 0 0 20.907287
matmul (click) 7323 8338 6 76 0 0% 0 0 2.951267
nbody (click) 15428 19810 9 201 0 0% 0 0 6.375147
nqueens (click) 21699 28649 8 252 0 0% 0 0 9.641367
optcarrot (click) 324183 308580 186 4508 34 0% 0 0 121.86233
protoboeuf (click) 163936 155521 15 1615 0 0% 0 0 57.192442
protoboeuf-encode (click) 235128 231105 17 1254 0 0% 0 0 38.89166
rack (click) 233871 205696 36 417 0 0% 0 0 12.951747
ruby-json (click) 22764 19399 6 158 0 0% 0 0 5.171444
rubykon (click) 140687 120490 135 1573 3 0% 0 0 53.360026
sudoku (click) 44903 40454 6 507 0 0% 0 0 18.571025
tinygql (click) 270869 229948 57 743 5 0% 0 0 24.984427
30k_ifelse (click) 6312890 5789092 9257 56443 0 0% 0 0 1945.815186
30k_methods (click) 2232791 1591091 5776 19329 0 0% 0 0 548.980471
cfunc_itself (click) 6912 5554 7 62 0 0% 0 0 2.286339
fib (click) 4585 4605 6 42 0 0% 0 0 1.83028
getivar (click) 5037 6014 6 64 0 0% 0 0 2.199736
keyword_args (click) 8181 6507 8 65 0 0% 0 0 2.62142
object-new (click) 3469 3394 5 35 0 0% 0 0 1.58219
respond_to (click) 9866 2524 7 100 0 0% 0 0 3.52351
ruby-xor (click) 4619 5278 3 52 0 0% 0 0 1.829246
setivar (click) 4188 4690 6 44 0 0% 0 0 1.718591
setivar_object (click) 4717 4838 6 46 0 0% 0 0 1.842181
setivar_young (click) 5427 5560 7 54 0 0% 0 0 2.119123
str_concat (click) 7646 7893 9 81 0 0% 0 0 3.231111
throw (click) 7384 5592 8 59 0 0% 0 0 2.34923

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.