YJIT Benchmarks

Details for Benchmarks at 2022-10-13 20:10:43

Overall YJIT is 38.1% faster than interpreted CRuby!
On Railsbench specifically, YJIT is 30.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 YJIT warmups YJIT iters
activerecord 5 196 5 196
hexapdf 5 15 5 15
liquid-render 5 176 5 176
mail 5 127 5 127
psych-load 5 15 5 15
railsbench 5 15 5 15
binarytrees 5 86 5 86
chunky_png 5 31 5 31
erubi 5 67 5 67
erubi_rails 5 1064 5 1064
etanni 5 42 5 42
fannkuchredux 5 15 5 15
lee 5 21 5 21
nbody 5 242 5 242
optcarrot 5 15 5 15
rubykon 5 15 5 15
30k_ifelse 5 57 5 57
30k_methods 5 24 5 24
cfunc_itself 5 312 5 312
fib 5 327 5 327
getivar 5 427 5 427
keyword_args 5 384 5 384
respond_to 5 701 5 701
setivar 5 425 5 425
str_concat 5 415 5 415

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) 2495249 1483070 23 286 6 2% 0 0 0
hexapdf (click) 1906003 1301292 872 9603 189 1% 0 0 0
liquid-render (click) 752659 493859 154 1741 34 1% 0 0 0
mail (click) 1487827 957001 385 4954 176 3% 0 0 0
psych-load (click) 950163 610998 68 490 19 3% 0 0 0
railsbench (click) 5421585 3313867 1784 12861 475 3% 0 0 0
binarytrees (click) 317395 197786 14 70 4 5% 0 0 0
chunky_png (click) 966227 626863 87 1032 31 3% 0 0 0
erubi (click) 899219 583997 11 78 4 5% 0 0 0
erubi_rails (click) 4492625 2661786 327 2456 107 4% 0 0 0
etanni (click) 317843 197344 11 38 4 10% 0 0 0
fannkuchredux (click) 331155 207909 11 200 4 2% 0 0 0
lee (click) 981587 638820 80 746 25 3% 0 0 0
nbody (click) 331859 207311 13 179 6 3% 0 0 0
optcarrot (click) 754835 542705 201 4001 93 2% 0 0 0
rubykon (click) 465683 310801 143 1552 32 2% 0 0 0
30k_ifelse (click) 5604627 4345108 9266 57127 4 0% 0 0 0
30k_methods (click) 2274899 1724637 5785 19356 4 0% 0 0 0
cfunc_itself (click) 314515 195326 11 53 4 7% 0 0 0
fib (click) 313043 195009 11 42 4 9% 0 0 0
getivar (click) 315155 196881 11 69 4 5% 0 0 0
keyword_args (click) 315283 195967 12 55 4 7% 0 0 0
respond_to (click) 315667 197102 11 55 5 9% 0 0 0
setivar (click) 316755 197180 11 42 4 9% 0 0 0
str_concat (click) 312275 194903 13 68 6 8% 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.