YJIT Benchmarks

Details for Benchmarks at 2022-01-05 19:09:51

Overall YJIT is 28.3% faster than interpreted CRuby!
On Railsbench specifically, YJIT is 29.4% 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 171 20 171 75 171 20 171
hexapdf 5 15 20 15 20 15
liquid-render 5 148 20 148 75 148 20 148
mail 5 128 20 128 75 128 20 128
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 50 20 50 75 50 20 50
erubi_rails 5 554 20 554 75 554 20 554
fannkuchredux 5 15 20 15 53 15 20 15
lee 5 25 20 25 75 25 20 25
nbody 5 342 20 342 75 342 20 342
optcarrot 5 15 20 15 75 15 20 15
rubykon 5 15 20 15 42 15 20 15
30k_ifelse 5 64 20 64 51 64 20 64
30k_methods 5 26 20 26 39 26 20 26
cfunc_itself 5 491 20 491 75 491 20 491
fib 5 383 20 383 75 383 20 383
getivar 5 562 20 562 75 562 20 562
keyword_args 5 423 20 423 75 423 20 423
respond_to 5 128 20 128 75 128 20 128
setivar 5 457 20 457 75 457 20 457

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) 970026 738920 184 1193 0 0% 0 0 0
hexapdf (click) 1116522 910587 598 8106 619 7% 0 0 321
liquid-render (click) 467063 368404 143 1433 95 6% 0 0 1
mail (click) 863594 639285 325 5441 124 2% 0 0 39
psych-load (click) 301418 235020 58 428 1 0% 0 0 0
railsbench (click) 2520290 1902923 1295 9332 266 2% 0 0 26
binarytrees (click) 112549 85965 9 48 0 0% 0 0 0
erubi (click) 272417 212973 8 35 0 0% 0 0 0
erubi_rails (click) 1893858 1415363 260 1919 16 0% 0 0 3
fannkuchredux (click) 128549 97975 6 202 0 0% 0 0 0
lee (click) 330474 259114 44 562 71 12% 0 0 12
nbody (click) 121957 93166 8 148 0 0% 0 0 0
optcarrot (click) 451173 398978 196 3566 20 0% 0 0 0
rubykon (click) 254437 206366 138 1528 1 0% 0 0 0
30k_ifelse (click) 5502181 4306618 9261 57794 0 0% 0 0 0
30k_methods (click) 2117349 1615080 5780 19351 0 0% 0 0 0
cfunc_itself (click) 111141 84594 6 39 0 0% 0 0 0
fib (click) 110117 84531 6 28 0 0% 0 0 0
getivar (click) 111333 86713 6 55 0 0% 0 0 0
keyword_args (click) 111973 85235 7 41 0 0% 0 0 0
respond_to (click) 113765 86377 6 54 0 0% 0 0 0
setivar (click) 111269 85237 6 28 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.