YJIT Benchmarks

Details for Benchmarks at 2024-09-19 01:25:27 UTC

YJIT metrics from the yjit-bench suite using Ruby 268c72377b

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 74.6% faster than CRuby 3.4.0dev
  • 3.0% faster than YJIT 3.3.4
On railsbench it is
  • 75.7% faster than CRuby 3.4.0dev
  • 1.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 10 58 10 57 10 146 10 149
chunky-png 10 18 10 17 10 36 10 41
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 485 10 517
liquid-compile 10 345 10 346 10 501 10 503
liquid-render 10 138 10 132 10 358 10 369
lobsters 10 13 10 13 10 24 10 23
mail 10 159 10 162 10 233 10 233
psych-load 10 10 10 10 10 10 10 10
railsbench 10 10 10 10 10 10 10 10
ruby-lsp 10 128 10 115 10 216 10 212
sequel 10 317 10 318 10 432 10 433
binarytrees 10 51 10 50 10 118 10 110
blurhash 10 62 10 63 10 120 10 144
erubi 10 84 10 100 10 106 10 127
etanni 10 60 10 68 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 33 10 47
lee 10 11 10 11 10 19 10 20
matmul 10 10 10 10 10 15 10 17
nbody 10 203 10 202 10 421 10 534
nqueens 10 113 10 114 10 113 10 426
optcarrot 10 10 10 10 10 10 10 10
protoboeuf 10 158 10 155 10 582 10 633
protoboeuf-encode 10 132 10 164 10 293 10 660
rack 10 460 10 483 10 827 10 909
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 30
tinygql 10 23 10 23 10 51 10 51
30k_ifelse 10 10 10 10 10 70 10 62
30k_methods 10 10 10 10 10 26 10 25
cfunc_itself 10 246 10 267 10 1108 10 1211
fib 10 102 10 99 10 616 10 623
getivar 10 214 10 230 10 1256 10 1738
keyword_args 10 89 10 89 10 729 10 947
object-new 10 225 10 185 10 309 10 227
respond_to 10 91 10 88 10 1786 10 2216
ruby-xor 10 30 10 31 10 92 10 163
setivar 10 348 10 390 10 2320 10 3109
setivar_object 10 216 10 219 10 536 10 481
setivar_young 10 216 10 219 10 528 10 475
str_concat 10 319 10 348 10 657 10 664
throw 10 972 10 813 10 1344 10 1014

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) 1452477 1266251 214 2301 0 0% 0 0 80.827878
chunky-png (click) 296668 244854 82 1090 1 0% 0 0 37.66156
erubi-rails (click) 1918007 1598062 246 2858 8 0% 0 0 93.17241
hexapdf (click) 1363369 1169356 507 12572 40 0% 0 0 432.630732
liquid-c (click) 491921 454017 119 1859 5 0% 0 0 60.602944
liquid-compile (click) 412042 347922 150 2197 2 0% 0 0 78.666277
liquid-render (click) 603357 505196 136 2473 12 0% 0 0 81.703895
lobsters (click) 8051662 6651968 3086 51757 182 0% 0 0 2068.164929
mail (click) 740505 650376 346 5489 16 0% 0 0 188.557996
psych-load (click) 248834 207022 60 615 3 0% 0 0 22.4986
railsbench (click) 3309129 2818343 1631 16668 41 0% 0 0 564.369164
ruby-lsp (click) 847982 792512 308 4987 26 0% 0 0 170.238757
sequel (click) 463914 438518 15 124 0 0% 0 0 5.254781
binarytrees (click) 9627 8546 8 75 0 0% 0 0 3.445526
blurhash (click) 57136 49713 29 501 0 0% 0 0 19.991014
erubi (click) 225768 188934 9 108 0 0% 0 0 4.148885
etanni (click) 24711 23355 10 87 0 0% 0 0 3.372688
fannkuchredux (click) 22572 29447 3 240 0 0% 0 0 9.140619
fluentd (click) 342715 297461 3 22 0 0% 0 0 1.011039
graphql (click) 393183 375634 65 651 0 0% 0 0 22.7473
graphql-native (click) 365088 328809 41 275 0 0% 0 0 10.320441
lee (click) 254835 237331 33 567 0 0% 0 0 20.81966
matmul (click) 7323 8338 6 76 0 0% 0 0 3.02526
nbody (click) 15428 19810 9 201 0 0% 0 0 6.345079
nqueens (click) 21699 28649 8 252 0 0% 0 0 9.639886
optcarrot (click) 324183 308580 186 4508 34 0% 0 0 121.839152
protoboeuf (click) 163936 155521 15 1615 0 0% 0 0 57.329754
protoboeuf-encode (click) 235128 231105 17 1254 0 0% 0 0 38.872699
rack (click) 240846 197026 36 417 0 0% 0 0 13.213161
ruby-json (click) 22164 19134 6 158 0 0% 0 0 5.221042
rubykon (click) 140687 120490 135 1573 3 0% 0 0 53.057139
sudoku (click) 44903 40454 6 507 0 0% 0 0 18.581806
tinygql (click) 267951 227459 57 743 5 0% 0 0 24.829297
30k_ifelse (click) 6312890 5789092 9257 56443 0 0% 0 0 1935.246585
30k_methods (click) 2232791 1591091 5776 19329 0 0% 0 0 552.214331
cfunc_itself (click) 6912 5554 7 62 0 0% 0 0 2.263352
fib (click) 4585 4605 6 42 0 0% 0 0 1.847964
getivar (click) 5037 6014 6 64 0 0% 0 0 2.204954
keyword_args (click) 8181 6507 8 65 0 0% 0 0 2.613443
object-new (click) 3469 3394 5 35 0 0% 0 0 1.593436
respond_to (click) 9866 2524 7 100 0 0% 0 0 3.56422
ruby-xor (click) 4619 5278 3 52 0 0% 0 0 1.811645
setivar (click) 4188 4690 6 44 0 0% 0 0 1.701331
setivar_object (click) 4717 4838 6 46 0 0% 0 0 1.860072
setivar_young (click) 5427 5560 7 54 0 0% 0 0 2.100165
str_concat (click) 7646 7893 9 81 0 0% 0 0 3.235575
throw (click) 7384 5592 8 59 0 0% 0 0 2.374565

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.