YJIT Benchmarks

Details for Benchmarks at 2022-08-16 20:14:09

Overall YJIT is 35.2% faster than interpreted CRuby!
On Railsbench specifically, YJIT is 35.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 156 75 156 20 156
mail 5 128 75 128 20 128
psych-load 5 15 75 15 20 15
railsbench 5 15 75 15 20 15
binarytrees 5 60 75 60 20 60
chunky_png 5 30 75 30 20 30
erubi 5 60 75 60 20 60
erubi_rails 5 1035 75 1035 20 1035
fannkuchredux 5 15 75 15 20 15
lee 5 20 75 20 20 20
nbody 5 260 75 260 20 260
optcarrot 5 15 75 15 20 15
rubykon 5 15 36 15 20 15
30k_ifelse 5 50 75 50 20 50
30k_methods 5 22 30 22 20 22
cfunc_itself 5 425 75 425 20 425
fib 5 315 75 315 20 315
getivar 5 639 75 639 20 639
keyword_args 5 360 75 360 20 360
respond_to 5 103 75 103 20 103
setivar 5 988 75 988 20 988
str_concat 5 449 75 449 20 449

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) 1035355 778983 131 1278 0 0% 0 0 0
hexapdf (click) 1151707 925266 683 8033 9 0% 0 0 0
liquid-render (click) 520475 405004 150 1702 2 0% 0 0 0
mail (click) 916891 660410 374 5512 17 0% 0 0 0
psych-load (click) 346843 262980 68 480 1 0% 0 0 0
railsbench (click) 2651675 1964029 1436 9995 16 0% 0 0 0
binarytrees (click) 156187 115504 12 53 0 0% 0 0 0
chunky_png (click) 386843 289468 88 1009 0 0% 0 0 0
erubi (click) 322715 245814 10 79 0 0% 0 0 0
erubi_rails (click) 1961691 1429120 300 2032 4 0% 0 0 0
fannkuchredux (click) 170139 125272 9 191 0 0% 0 0 0
lee (click) 384795 290391 58 632 0 0% 0 0 0
nbody (click) 166811 124699 11 166 0 0% 0 0 0
optcarrot (click) 486363 420863 206 3583 20 0% 0 0 0
rubykon (click) 305691 244594 143 1572 1 0% 0 0 0
30k_ifelse (click) 5533403 4326969 9264 57799 0 0% 0 0 0
30k_methods (click) 2148571 1635431 5783 19356 0 0% 0 0 0
cfunc_itself (click) 154715 114277 9 44 0 0% 0 0 0
fib (click) 153179 113885 9 33 0 0% 0 0 0
getivar (click) 154907 115972 9 60 0 0% 0 0 0
keyword_args (click) 143707 105915 10 46 0 0% 0 0 0
respond_to (click) 144987 106728 9 59 0 0% 0 0 0
setivar (click) 154587 114507 9 33 0 0% 0 0 0
str_concat (click) 154843 115124 11 57 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.