YJIT Benchmarks

Details for Benchmarks at 2022-01-26 10:41:37

Overall YJIT is 30.6% faster than interpreted CRuby!
On Railsbench specifically, YJIT is 26.5% 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 191 20 191 75 191 20 191
hexapdf 5 15 20 15 20 15
liquid-render 5 178 20 178 75 178 20 178
mail 5 140 20 140 75 140 20 140
psych-load 5 15 20 15 75 15 20 15
railsbench 5 15 20 15 75 15 20 15
binarytrees 5 90 20 90 75 90 20 90
discourse 5 371 20 371 75 371 20 371
erubi 5 56 20 56 75 56 20 56
erubi_rails 5 1003 20 1003 75 1003 20 1003
fannkuchredux 5 15 20 15 75 15 20 15
lee 5 26 20 26 75 26 20 26
nbody 5 344 20 344 75 344 20 344
optcarrot 5 15 20 15 75 15 20 15
rubykon 5 15 20 15 44 15 20 15
30k_ifelse 5 62 20 62 72 62 20 62
30k_methods 5 26 20 26 42 26 20 26
cfunc_itself 5 504 20 504 75 504 20 504
fib 5 383 20 383 75 383 20 383
getivar 5 947 20 947 75 947 20 947
keyword_args 5 453 20 453 75 453 20 453
respond_to 5 121 20 121 75 121 20 121
setivar 5 2148 20 2148 75 2148 20 2148

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) 1004817 773042 185 1199 0 0% 0 0 0
hexapdf (click) 1129169 926956 600 8166 613 7% 0 0 321
liquid-render (click) 497297 396598 143 1568 95 6% 0 0 1
mail (click) 897297 675476 324 5314 125 2% 0 0 39
psych-load (click) 342737 273081 59 434 1 0% 0 0 0
railsbench (click) 2538385 1938304 1297 9298 268 2% 0 0 26
binarytrees (click) 158865 122928 11 58 0 0% 0 0 0
discourse (click) 18126993 9544242 3021 213531 190889 89% 2 0 133
erubi (click) 336785 269628 10 79 0 0% 0 0 0
erubi_rails (click) 1927057 1454307 262 1956 18 0% 0 0 3
fannkuchredux (click) 172625 133626 8 188 0 0% 0 0 0
lee (click) 378257 299763 45 587 69 11% 0 0 12
nbody (click) 168145 130129 10 158 0 0% 0 0 0
optcarrot (click) 495377 435759 198 3575 20 0% 0 0 0
rubykon (click) 300305 243471 140 1534 1 0% 0 0 0
30k_ifelse (click) 5547921 4343252 9263 57804 0 0% 0 0 0
30k_methods (click) 2163089 1651714 5782 19361 0 0% 0 0 0
cfunc_itself (click) 157329 121557 8 49 0 0% 0 0 0
fib (click) 156433 121494 8 38 0 0% 0 0 0
getivar (click) 157649 123676 8 65 0 0% 0 0 0
keyword_args (click) 158225 122198 9 51 0 0% 0 0 0
respond_to (click) 160017 123340 8 64 0 0% 0 0 0
setivar (click) 157649 122200 8 38 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.