YJIT Benchmarks

Details for Benchmarks at 2022-08-18 05:25:22

Overall YJIT is 33.3% faster than interpreted CRuby!
On Railsbench specifically, YJIT is 30.9% 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 192 75 192 20 192
hexapdf 5 15 20 15
liquid-render 5 156 75 156 20 156
mail 5 127 75 127 20 127
psych-load 5 15 75 15 20 15
railsbench 5 15 75 15 20 15
binarytrees 5 61 75 61 20 61
chunky_png 5 30 75 30 20 30
erubi 5 61 75 61 20 61
erubi_rails 5 1025 75 1025 20 1025
fannkuchredux 5 15 75 15 20 15
lee 5 20 75 20 20 20
nbody 5 263 75 263 20 263
optcarrot 5 15 75 15 20 15
rubykon 5 15 36 15 20 15
30k_ifelse 5 56 75 56 20 56
30k_methods 5 23 30 23 20 23
cfunc_itself 5 428 75 428 20 428
fib 5 315 75 315 20 315
getivar 5 624 75 624 20 624
keyword_args 5 364 75 364 20 364
respond_to 5 109 75 109 20 109
setivar 5 987 75 987 20 987
str_concat 5 448 75 448 20 448

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) 1033563 777664 131 1258 0 0% 0 0 0
hexapdf (click) 1150043 923937 682 8015 9 0% 0 0 0
liquid-render (click) 517915 402203 150 1673 2 0% 0 0 0
mail (click) 920539 662750 374 5537 17 0% 0 0 0
psych-load (click) 344603 261150 68 482 1 0% 0 0 0
railsbench (click) 2655451 1966565 1436 10029 16 0% 0 0 0
binarytrees (click) 144347 106501 12 53 0 0% 0 0 0
chunky_png (click) 389979 290963 88 1042 0 0% 0 0 0
erubi (click) 322331 245596 10 79 0 0% 0 0 0
erubi_rails (click) 1961051 1428775 300 2026 4 0% 0 0 0
fannkuchredux (click) 170139 125272 9 191 0 0% 0 0 0
lee (click) 384539 290391 58 632 0 0% 0 0 0
nbody (click) 154971 115696 11 166 0 0% 0 0 0
optcarrot (click) 486363 420863 206 3583 20 0% 0 0 0
rubykon (click) 306203 244641 143 1575 1 0% 0 0 0
30k_ifelse (click) 5545243 4335972 9264 57799 0 0% 0 0 0
30k_methods (click) 2160411 1644434 5783 19356 0 0% 0 0 0
cfunc_itself (click) 154523 113992 9 44 0 0% 0 0 0
fib (click) 153179 113885 9 33 0 0% 0 0 0
getivar (click) 143067 106969 9 60 0 0% 0 0 0
keyword_args (click) 155547 114918 10 46 0 0% 0 0 0
respond_to (click) 144987 106728 9 59 0 0% 0 0 0
setivar (click) 154843 114792 9 33 0 0% 0 0 0
str_concat (click) 154843 115124 11 57 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.