YJIT Benchmarks

Details for Benchmarks at 2022-09-01 05:35:25

Overall YJIT is 34.8% faster than interpreted CRuby!
On Railsbench specifically, YJIT is 32.4% faster than CRuby!

The basic "faster" measurement is the geomean of all "headlining" x86 benchmarks on this page.

Headlining Benchmarks

These are "headlining" because the "overall" speedup above is based on these benchmarks specifically.

Speed of each Ruby implementation (iterations/second) relative to the CRuby interpreter. Higher is better.

Other Benchmarks

Speed of each Ruby implementation (iterations/second) relative to the CRuby interpreter. Higher is better.

MicroBenchmarks

Speed of each Ruby implementation (iterations/second) relative to the CRuby interpreter. Higher is better.

Want Raw Graphs and CSV?

Benchmarks Speed Details

Benchmark Memory Usage Details

Number of Iterations and Warmups Tested

bench No JIT warmups No JIT iters MJIT warmups MJIT iters YJIT warmups YJIT iters
activerecord 5 190 75 190 20 190
hexapdf 5 15 20 15
liquid-render 5 158 75 158 20 158
mail 5 126 75 126 20 126
psych-load 5 15 75 15 20 15
railsbench 5 15 75 15 20 15
binarytrees 5 62 75 62 20 62
chunky_png 5 29 75 29 20 29
erubi 5 60 75 60 20 60
erubi_rails 5 1019 75 1019 20 1019
fannkuchredux 5 15 75 15 20 15
lee 5 20 75 20 20 20
nbody 5 261 75 261 20 261
optcarrot 5 15 75 15 20 15
rubykon 5 15 37 15 20 15
30k_ifelse 5 51 70 51 20 51
30k_methods 5 24 22 24 20 24
cfunc_itself 5 419 75 419 20 419
fib 5 300 75 300 20 300
getivar 5 617 75 617 20 617
keyword_args 5 361 75 361 20 361
respond_to 5 106 75 106 20 106
setivar 5 983 75 983 20 983
str_concat 5 398 75 398 20 398

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
activerecord (click) 1122371 781225 131 1283 0 0% 0 0 0
hexapdf (click) 1252611 924183 683 8020 9 0% 0 0 0
liquid-render (click) 564611 404985 150 1708 2 0% 0 0 0
mail (click) 1000963 668469 374 5601 17 0% 0 0 0
psych-load (click) 374787 262858 68 482 1 0% 0 0 0
railsbench (click) 2880771 1973408 1436 10036 16 0% 0 0 0
binarytrees (click) 185155 128129 13 58 0 0% 0 0 0
chunky_png (click) 419459 291067 88 997 0 0% 0 0 0
erubi (click) 359299 252700 10 79 0 0% 0 0 0
erubi_rails (click) 2129347 1431585 300 2000 4 0% 0 0 0
fannkuchredux (click) 199555 137469 10 196 0 0% 0 0 0
lee (click) 416899 290566 58 632 0 0% 0 0 0
nbody (click) 196611 136896 12 171 0 0% 0 0 0
optcarrot (click) 563651 442725 207 3588 20 0% 0 0 0
rubykon (click) 347715 256257 144 1571 1 0% 0 0 0
30k_ifelse (click) 5920643 4348219 9265 57804 0 0% 0 0 0
30k_methods (click) 2288003 1656681 5784 19361 0 0% 0 0 0
cfunc_itself (click) 183555 126852 10 49 0 0% 0 0 0
fib (click) 181699 126132 10 38 0 0% 0 0 0
getivar (click) 183619 128219 10 65 0 0% 0 0 0
keyword_args (click) 184451 127543 11 51 0 0% 0 0 0
respond_to (click) 185731 127928 10 64 0 0% 0 0 0
setivar (click) 183363 127039 10 38 0 0% 0 0 0
str_concat (click) 183235 127321 12 62 0 0% 0 0 0

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.