YJIT Benchmarks

Details for Benchmarks at 2022-01-20 07:12:37 UTC

YJIT metrics from the yjit-bench suite

Overall YJIT is 31.6% faster than interpreted CRuby!
On Railsbench specifically, YJIT is 29.1% faster than CRuby!

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 No JIT warmups No JIT iters MJIT3.0 warmups MJIT3.0 iters MJIT warmups MJIT iters YJIT warmups YJIT iters
activerecord 5 197 20 197 75 197 20 197
hexapdf 5 15 20 15 20 15
liquid-render 5 183 20 183 75 183 20 183
mail 5 142 20 142 75 142 20 142
psych-load 5 15 20 15 75 15 20 15
railsbench 5 15 20 15 75 15 20 15
binarytrees 5 86 20 86 75 86 20 86
erubi 5 56 20 56 75 56 20 56
erubi_rails 5 994 20 994 75 994 20 994
fannkuchredux 5 15 20 15 75 15 20 15
lee 5 26 20 26 75 26 20 26
nbody 5 344 20 344 75 344 20 344
optcarrot 5 15 20 15 75 15 20 15
rubykon 5 15 20 15 42 15 20 15
30k_ifelse 5 62 20 62 75 62 20 62
30k_methods 5 27 20 27 45 27 20 27
cfunc_itself 5 537 20 537 75 537 20 537
fib 5 384 20 384 75 384 20 384
getivar 5 961 20 961 75 961 20 961
keyword_args 5 445 20 445 75 445 20 445
respond_to 5 123 20 123 75 123 20 123
setivar 5 2212 20 2212 75 2212 20 2212

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) 965969 739794 185 1195 0 0% 0 0 0
hexapdf (click) 1094737 896551 599 8169 614 7% 0 0 321
liquid-render (click) 476113 378431 143 1536 96 6% 0 0 1
mail (click) 859089 642537 325 5331 124 2% 0 0 39
psych-load (click) 297041 233782 58 445 1 0% 0 0 0
railsbench (click) 2511633 1912290 1297 9364 268 2% 0 0 26
binarytrees (click) 113809 87161 10 54 0 0% 0 0 0
erubi (click) 293969 233366 9 73 0 0% 0 0 0
erubi_rails (click) 1885457 1419330 261 1876 18 0% 0 0 3
fannkuchredux (click) 127185 97643 7 184 0 0% 0 0 0
lee (click) 336849 264658 45 586 70 11% 0 0 12
nbody (click) 123089 94362 9 154 0 0% 0 0 0
optcarrot (click) 450321 399992 197 3571 20 0% 0 0 0
rubykon (click) 258513 210847 139 1581 1 0% 0 0 0
30k_ifelse (click) 5502353 4307156 9262 57800 0 0% 0 0 0
30k_methods (click) 2118033 1615947 5781 19357 0 0% 0 0 0
cfunc_itself (click) 112273 85790 7 45 0 0% 0 0 0
fib (click) 110353 85069 7 34 0 0% 0 0 0
getivar (click) 112081 87580 7 61 0 0% 0 0 0
keyword_args (click) 112657 86102 8 47 0 0% 0 0 0
respond_to (click) 113809 86817 7 60 0 0% 0 0 0
setivar (click) 112209 86217 7 34 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.