YJIT Benchmarks

Details for Benchmarks at 2022-01-25 19:12:35

Overall YJIT is 30.6% faster than interpreted CRuby!
On Railsbench specifically, YJIT is 29.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 MJIT3.0 warmups MJIT3.0 iters MJIT warmups MJIT iters YJIT warmups YJIT iters
activerecord 5 194 20 194 75 194 20 194
hexapdf 5 15 20 15 20 15
liquid-render 5 179 20 179 75 179 20 179
mail 5 144 20 144 75 144 20 144
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
discourse 15 15 15 15 15 15 15 15
erubi 5 54 20 54 75 54 20 54
erubi_rails 5 1027 20 1027 75 1027 20 1027
fannkuchredux 5 15 20 15 75 15 20 15
lee 5 26 20 26 75 26 20 26
nbody 5 342 20 342 75 342 20 342
optcarrot 5 15 20 15 75 15 20 15
rubykon 5 15 20 15 44 15 20 15
30k_ifelse 5 65 20 65 73 65 20 65
30k_methods 5 27 20 27 42 27 20 27
cfunc_itself 5 505 20 505 75 505 20 505
fib 5 384 20 384 75 384 20 384
getivar 5 954 20 954 75 954 20 954
keyword_args 5 456 20 456 75 456 20 456
respond_to 5 122 20 122 75 122 20 122
setivar 5 2179 20 2179 75 2179 20 2179

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) 1005329 773226 185 1199 0 0% 0 0 0
hexapdf (click) 1129681 927427 600 8170 615 7% 0 0 321
liquid-render (click) 489041 390166 143 1487 95 6% 0 0 1
mail (click) 899217 677080 324 5320 125 2% 0 0 39
psych-load (click) 344145 274067 59 439 1 0% 0 0 0
railsbench (click) 2544913 1942343 1297 9359 268 2% 0 0 26
binarytrees (click) 158865 122928 11 58 0 0% 0 0 0
discourse (click) 7255057 5209083 3000 41880 19617 46% 2 0 133
erubi (click) 337297 269957 10 79 0 0% 0 0 0
erubi_rails (click) 1926353 1454612 262 1945 18 0% 0 0 3
fannkuchredux (click) 172625 133626 8 188 0 0% 0 0 0
lee (click) 378769 300092 45 587 69 11% 0 0 12
nbody (click) 168081 130056 10 158 0 0% 0 0 0
optcarrot (click) 495889 436088 198 3575 20 0% 0 0 0
rubykon (click) 300433 243356 140 1532 1 0% 0 0 0
30k_ifelse (click) 5547921 4343252 9263 57804 0 0% 0 0 0
30k_methods (click) 2163089 1651714 5782 19361 0 0% 0 0 0
cfunc_itself (click) 157329 121557 8 49 0 0% 0 0 0
fib (click) 155921 121165 8 38 0 0% 0 0 0
getivar (click) 157649 123676 8 65 0 0% 0 0 0
keyword_args (click) 158225 122198 9 51 0 0% 0 0 0
respond_to (click) 160017 123340 8 64 0 0% 0 0 0
setivar (click) 157649 122200 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.