YJIT Benchmarks

Details for Benchmarks at 2022-01-07 07:10:27

Overall YJIT is 28.7% faster than interpreted CRuby!
On Railsbench specifically, YJIT is 32.0% 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 MJIT3.0 warmups MJIT3.0 iters MJIT warmups MJIT iters YJIT warmups YJIT iters
activerecord 5 183 20 183 75 183 20 183
hexapdf 5 15 20 15 20 15
liquid-render 5 157 20 157 75 157 20 157
mail 5 138 20 138 75 138 20 138
psych-load 5 15 20 15 75 15 20 15
railsbench 5 15 20 15 75 15 20 15
binarytrees 5 84 20 84 75 84 20 84
erubi 5 51 20 51 75 51 20 51
erubi_rails 5 940 20 940 75 940 20 940
fannkuchredux 5 15 20 15 54 15 20 15
lee 5 26 20 26 75 26 20 26
nbody 5 343 20 343 75 343 20 343
optcarrot 5 15 20 15 75 15 20 15
rubykon 5 15 20 15 43 15 20 15
30k_ifelse 5 62 20 62 75 62 20 62
30k_methods 5 26 20 26 42 26 20 26
cfunc_itself 5 510 20 510 75 510 20 510
fib 5 384 20 384 75 384 20 384
getivar 5 563 20 563 75 563 20 563
keyword_args 5 431 20 431 75 431 20 431
respond_to 5 126 20 126 75 126 20 126
setivar 5 480 20 480 75 480 20 480

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) 970011 738847 185 1198 0 0% 0 0 0
hexapdf (click) 1117531 911012 600 8114 618 7% 0 0 321
liquid-render (click) 468123 368730 144 1442 95 6% 0 0 1
mail (click) 846875 627045 326 5257 124 2% 0 0 39
psych-load (click) 302619 235688 59 438 1 0% 0 0 0
railsbench (click) 2516955 1900994 1296 9301 266 2% 0 0 26
binarytrees (click) 113691 86598 10 53 0 0% 0 0 0
erubi (click) 272923 213164 9 40 0 0% 0 0 0
erubi_rails (click) 1898843 1418999 261 1964 16 0% 0 0 3
fannkuchredux (click) 129691 98608 7 207 0 0% 0 0 0
lee (click) 331611 259747 45 567 71 12% 0 0 12
nbody (click) 123099 93799 9 153 0 0% 0 0 0
optcarrot (click) 451931 399395 197 3571 20 0% 0 0 0
rubykon (click) 254619 206490 139 1529 1 0% 0 0 0
30k_ifelse (click) 5502299 4306593 9262 57799 0 0% 0 0 0
30k_methods (click) 2117595 1615168 5781 19356 0 0% 0 0 0
cfunc_itself (click) 112283 85227 7 44 0 0% 0 0 0
fib (click) 110235 84506 7 33 0 0% 0 0 0
getivar (click) 111963 87017 7 60 0 0% 0 0 0
keyword_args (click) 112603 85539 8 46 0 0% 0 0 0
respond_to (click) 113883 86352 7 59 0 0% 0 0 0
setivar (click) 111899 85541 7 33 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.