YJIT Benchmarks

Details for Benchmarks at 2022-08-17 05:30:07

Overall YJIT is 34.3% faster than interpreted CRuby!
On Railsbench specifically, YJIT is 32.9% 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 157 75 157 20 157
mail 5 127 75 127 20 127
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 30 75 30 20 30
erubi 5 60 75 60 20 60
erubi_rails 5 1041 75 1041 20 1041
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 56 75 56 20 56
30k_methods 5 22 29 22 20 22
cfunc_itself 5 411 75 411 20 411
fib 5 315 75 315 20 315
getivar 5 630 75 630 20 630
keyword_args 5 366 75 366 20 366
respond_to 5 104 75 104 20 104
setivar 5 990 75 990 20 990
str_concat 5 447 75 447 20 447

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) 1033883 777821 131 1266 0 0% 0 0 0
hexapdf (click) 1150683 924322 682 8023 9 0% 0 0 0
liquid-render (click) 514843 400321 150 1645 2 0% 0 0 0
mail (click) 925467 666050 375 5605 17 0% 0 0 0
psych-load (click) 346843 262980 68 480 1 0% 0 0 0
railsbench (click) 2657883 1968094 1436 10047 16 0% 0 0 0
binarytrees (click) 156187 115504 12 53 0 0% 0 0 0
chunky_png (click) 385435 288393 88 998 0 0% 0 0 0
erubi (click) 322715 245814 10 79 0 0% 0 0 0
erubi_rails (click) 1959835 1427668 300 1999 4 0% 0 0 0
fannkuchredux (click) 170139 125272 9 191 0 0% 0 0 0
lee (click) 384987 290559 58 632 0 0% 0 0 0
nbody (click) 166811 124699 11 166 0 0% 0 0 0
optcarrot (click) 498203 429866 206 3583 20 0% 0 0 0
rubykon (click) 306075 244715 143 1573 1 0% 0 0 0
30k_ifelse (click) 5545243 4335972 9264 57799 0 0% 0 0 0
30k_methods (click) 2160411 1644434 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) 155547 114918 10 46 0 0% 0 0 0
respond_to (click) 156827 115731 9 59 0 0% 0 0 0
setivar (click) 154843 114792 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.