YJIT Benchmarks

Details for Benchmarks at 2022-08-05 20:14:04

Overall YJIT is 37.7% faster than interpreted CRuby!
On Railsbench specifically, YJIT is 37.1% 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 193 75 193 20 193
hexapdf 5 15 20 15
liquid-render 5 149 75 149 20 149
mail 5 129 75 129 20 129
psych-load 5 15 75 15 20 15
railsbench 5 15 75 15 20 15
binarytrees 5 65 75 65 20 65
chunky_png 5 30 75 30 20 30
erubi 5 62 75 62 20 62
erubi_rails 5 1030 75 1030 20 1030
fannkuchredux 5 15 75 15 20 15
lee 5 21 75 21 20 21
nbody 5 233 75 233 20 233
optcarrot 5 15 75 15 20 15
rubykon 5 15 37 15 20 15
30k_ifelse 5 55 75 55 20 55
30k_methods 5 22 29 22 20 22
cfunc_itself 5 438 75 438 20 438
fib 5 314 75 314 20 314
getivar 5 610 75 610 20 610
keyword_args 5 379 75 379 20 379
respond_to 5 106 75 106 20 106
setivar 5 960 75 960 20 960
str_concat 5 458 75 458 20 458

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) 1034331 778232 131 1276 0 0% 0 0 0
hexapdf (click) 1150875 924444 683 8021 10 0% 0 0 0
liquid-render (click) 522971 406902 150 1706 2 0% 0 0 0
mail (click) 906779 653611 374 5379 17 0% 0 0 0
psych-load (click) 347419 263298 68 482 1 0% 0 0 0
railsbench (click) 2653595 1965008 1436 10004 16 0% 0 0 0
binarytrees (click) 171931 128248 13 58 0 0% 0 0 0
chunky_png (click) 388827 290375 88 1026 0 0% 0 0 0
erubi (click) 323867 246820 10 79 0 0% 0 0 0
erubi_rails (click) 1960859 1428567 300 1997 4 0% 0 0 0
fannkuchredux (click) 185755 138378 10 188 0 0% 0 0 0
lee (click) 386203 291615 58 632 0 0% 0 0 0
nbody (click) 182299 137158 12 171 0 0% 0 0 0
optcarrot (click) 513499 442314 207 3588 20 0% 0 0 0
rubykon (click) 321691 257816 144 1580 2 0% 0 0 0
30k_ifelse (click) 5560987 4348716 9265 57804 0 0% 0 0 0
30k_methods (click) 2176155 1657178 5784 19361 0 0% 0 0 0
cfunc_itself (click) 170011 126725 10 49 0 0% 0 0 0
fib (click) 168475 126333 10 38 0 0% 0 0 0
getivar (click) 170651 128716 10 65 0 0% 0 0 0
keyword_args (click) 171291 127662 11 51 0 0% 0 0 0
respond_to (click) 172571 128475 10 64 0 0% 0 0 0
setivar (click) 170587 127536 10 38 0 0% 0 0 0
str_concat (click) 170139 127572 12 62 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.