YJIT Benchmarks

Details for Benchmarks at 2022-10-11 04:39:50

Overall YJIT is 34.8% faster than interpreted CRuby!
On Railsbench specifically, YJIT is 30.0% 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 195 5 195
hexapdf 5 15 5 15
liquid-render 5 175 5 175
mail 5 127 5 127
psych-load 5 15 5 15
railsbench 5 15 5 15
binarytrees 5 88 5 88
chunky_png 5 30 5 30
erubi 5 66 5 66
erubi_rails 5 1014 5 1014
fannkuchredux 5 15 5 15
lee 5 21 5 21
nbody 5 225 5 225
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 475 5 475
fib 5 324 5 324
getivar 5 467 5 467
keyword_args 5 373 5 373
respond_to 5 654 5 654
setivar 5 493 5 493
str_concat 5 407 5 407

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) 2477329 1539838 23 265 6 2% 0 0 0
hexapdf (click) 1885139 1384177 872 9354 181 1% 0 0 0
liquid-render (click) 745107 516001 154 1660 34 2% 0 0 0
mail (click) 1472339 986595 385 4871 174 3% 0 0 0
psych-load (click) 929235 621755 68 434 18 4% 0 0 0
railsbench (click) 5387537 3444039 1784 12455 470 3% 0 0 0
binarytrees (click) 313555 200338 14 70 4 5% 0 0 0
chunky_png (click) 959251 646756 87 1006 31 3% 0 0 0
erubi (click) 889747 599900 11 76 4 5% 0 0 0
erubi_rails (click) 4476177 2770605 327 2447 104 4% 0 0 0
fannkuchredux (click) 323219 208313 11 200 4 2% 0 0 0
lee (click) 974995 660245 80 744 25 3% 0 0 0
nbody (click) 328979 212755 13 179 6 3% 0 0 0
optcarrot (click) 753043 591730 201 3773 93 2% 0 0 0
rubykon (click) 470611 331224 143 1568 32 2% 0 0 0
30k_ifelse (click) 5624659 4414567 9266 57127 4 0% 0 0 0
30k_methods (click) 2275539 1730194 5785 19356 4 0% 0 0 0
cfunc_itself (click) 310995 198190 11 53 4 7% 0 0 0
fib (click) 309651 197986 11 42 4 9% 0 0 0
getivar (click) 308691 198808 11 69 4 5% 0 0 0
keyword_args (click) 315923 201459 12 55 4 7% 0 0 0
respond_to (click) 310867 198954 11 55 5 9% 0 0 0
setivar (click) 315923 201643 11 42 4 9% 0 0 0
str_concat (click) 315923 201996 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.