YJIT Benchmarks

Details for Benchmarks at 2022-01-22 19:12:54

Overall YJIT is 32.2% faster than interpreted CRuby!
On Railsbench specifically, YJIT is 27.6% 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 196 20 196 75 196 20 196
hexapdf 5 15 20 15 20 15
liquid-render 5 177 20 177 75 177 20 177
mail 5 139 20 139 75 139 20 139
psych-load 5 15 20 15 75 15 20 15
railsbench 5 15 20 15 75 15 20 15
binarytrees 5 85 20 85 75 85 20 85
erubi 5 54 20 54 75 54 20 54
erubi_rails 5 990 20 990 75 990 20 990
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 43 15 20 15
30k_ifelse 5 63 20 63 71 63 20 63
30k_methods 5 27 20 27 43 27 20 27
cfunc_itself 5 529 20 529 75 529 20 529
fib 5 383 20 383 75 383 20 383
getivar 5 952 20 952 75 952 20 952
keyword_args 5 421 20 421 75 421 20 421
respond_to 5 126 20 126 75 126 20 126
setivar 5 2184 20 2184 75 2184 20 2184

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) 974289 747410 185 1198 0 0% 0 0 0
hexapdf (click) 1101393 902902 599 8163 614 7% 0 0 321
liquid-render (click) 477713 379829 143 1531 95 6% 0 0 1
mail (click) 847377 635644 324 5133 124 2% 0 0 39
psych-load (click) 306769 243382 58 428 1 0% 0 0 0
railsbench (click) 2517649 1918295 1297 9362 268 2% 0 0 26
binarytrees (click) 118929 91393 10 54 0 0% 0 0 0
erubi (click) 301777 240452 9 73 0 0% 0 0 0
erubi_rails (click) 1897681 1429027 261 1924 18 0% 0 0 3
fannkuchredux (click) 133201 102420 7 184 0 0% 0 0 0
lee (click) 343953 271343 45 586 70 11% 0 0 12
nbody (click) 128337 98707 9 154 0 0% 0 0 0
optcarrot (click) 455953 404553 197 3571 20 0% 0 0 0
rubykon (click) 264593 215644 139 1585 1 0% 0 0 0
30k_ifelse (click) 5507985 4311717 9262 57800 0 0% 0 0 0
30k_methods (click) 2123153 1620179 5781 19357 0 0% 0 0 0
cfunc_itself (click) 117905 90351 7 45 0 0% 0 0 0
fib (click) 116497 89959 7 34 0 0% 0 0 0
getivar (click) 117713 92141 7 61 0 0% 0 0 0
keyword_args (click) 118801 90992 8 47 0 0% 0 0 0
respond_to (click) 120081 91805 7 60 0 0% 0 0 0
setivar (click) 117713 90665 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.