YJIT Benchmarks

Details for Benchmarks at 2022-08-17 20:13:59

Overall YJIT is 35.3% faster than interpreted CRuby!
On Railsbench specifically, YJIT is 37.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 128 75 128 20 128
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 61 75 61 20 61
erubi_rails 5 1026 75 1026 20 1026
fannkuchredux 5 15 75 15 20 15
lee 5 20 75 20 20 20
nbody 5 250 75 250 20 250
optcarrot 5 15 75 15 20 15
rubykon 5 15 36 15 20 15
30k_ifelse 5 55 75 55 20 55
30k_methods 5 22 29 22 20 22
cfunc_itself 5 410 75 410 20 410
fib 5 315 75 315 20 315
getivar 5 632 75 632 20 632
keyword_args 5 365 75 365 20 365
respond_to 5 104 75 104 20 104
setivar 5 991 75 991 20 991
str_concat 5 443 75 443 20 443

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) 1035099 778367 131 1270 0 0% 0 0 0
hexapdf (click) 1149787 923249 683 8012 9 0% 0 0 0
liquid-render (click) 512795 398856 150 1625 2 0% 0 0 0
mail (click) 916059 661470 374 5512 17 0% 0 0 0
psych-load (click) 346843 263005 68 480 1 0% 0 0 0
railsbench (click) 2651035 1963134 1436 9991 16 0% 0 0 0
binarytrees (click) 156187 115504 12 53 0 0% 0 0 0
chunky_png (click) 386331 288957 88 1006 0 0% 0 0 0
erubi (click) 322715 245789 10 79 0 0% 0 0 0
erubi_rails (click) 1960667 1428343 300 2026 4 0% 0 0 0
fannkuchredux (click) 170139 125272 9 191 0 0% 0 0 0
lee (click) 384923 290609 58 632 0 0% 0 0 0
nbody (click) 154779 115411 11 166 0 0% 0 0 0
optcarrot (click) 498203 429866 206 3583 20 0% 0 0 0
rubykon (click) 306075 244725 143 1574 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) 144987 106728 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.