YJIT Benchmarks

Details for Benchmarks at 2022-04-03 19:13:15

Overall YJIT is 30.6% faster than interpreted CRuby!
On Railsbench specifically, YJIT is 26.5% 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 182 75 182 20 182
hexapdf 5 15 20 15
liquid-render 5 156 75 156 20 156
mail 5 123 75 123 20 123
psych-load 5 15 75 15 20 15
railsbench 5 15 75 15 20 15
binarytrees 5 63 75 63 20 63
chunky_png 5 29 75 29 20 29
discourse 5 39 75 39 20 39
erubi 5 47 75 47 20 47
erubi_rails 5 979 75 979 20 979
fannkuchredux 5 15 75 15 20 15
lee 5 21 75 21 20 21
nbody 5 275 75 275 20 275
optcarrot 5 15 75 15 20 15
rubykon 5 15 23 15 20 15
30k_ifelse 5 54 75 54 20 54
30k_methods 5 21 29 21 20 21
cfunc_itself 5 446 75 446 20 446
fib 5 319 75 319 20 319
getivar 5 787 75 787 20 787
keyword_args 5 376 75 376 20 376
respond_to 5 110 75 110 20 110
setivar 5 1830 75 1830 20 1830

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) 992593 813439 185 1185 0 0% 0 0 0
hexapdf (click) 1099985 923942 599 7894 429 5% 0 0 321
liquid-render (click) 504337 424917 143 1528 93 6% 0 0 5
mail (click) 844561 655630 324 4956 96 1% 0 0 111
psych-load (click) 342225 287077 59 434 1 0% 0 0 0
railsbench (click) 2601169 2106690 1297 9411 224 2% 0 0 26
binarytrees (click) 170193 139317 11 58 0 0% 0 0 0
chunky_png (click) 377041 310387 85 866 0 0% 0 0 0
discourse (click) 6269137 5627803 3140 27147 3230 11% 2 0 140
erubi (click) 330065 277546 10 79 0 0% 0 0 0
erubi_rails (click) 1957137 1597547 262 1887 12 0% 0 0 3
fannkuchredux (click) 183313 149102 8 189 0 0% 0 0 0
lee (click) 379409 316443 45 582 68 11% 0 0 13
nbody (click) 179345 146405 10 158 0 0% 0 0 0
optcarrot (click) 507089 452364 198 3575 20 0% 0 0 0
rubykon (click) 311505 259436 140 1528 1 0% 0 0 0
30k_ifelse (click) 5558801 4359150 9263 57804 0 0% 0 0 0
30k_methods (click) 2174609 1667897 5782 19362 0 0% 0 0 0
cfunc_itself (click) 168209 137455 8 49 0 0% 0 0 0
fib (click) 167249 137554 8 38 0 0% 0 0 0
getivar (click) 168849 139952 8 65 0 0% 0 0 0
keyword_args (click) 169937 138803 9 51 0 0% 0 0 0
respond_to (click) 170833 139400 8 64 0 0% 0 0 0
setivar (click) 168977 138589 8 38 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.