YJIT Benchmarks

Details for Benchmarks at 2023-03-03 01:59:47

Overall YJIT is 43.6% faster than interpreted CRuby!
On Railsbench specifically, YJIT is 51.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 YJIT warmups YJIT iters
activerecord 30 188 30 188
hexapdf 30 15 30 15
liquid-c 30 338 30 338
liquid-render 30 184 30 184
mail 30 152 30 152
psych-load 30 15 30 15
railsbench 30 15 30 15
ruby-lsp 30 317 30 317
sequel 30 138 30 138
binarytrees 30 84 30 84
chunky_png 30 31 30 31
erubi 30 79 30 79
erubi_rails 30 1277 30 1277
etanni 30 48 30 48
fannkuchredux 30 23 30 23
lee 30 22 30 22
nbody 30 261 30 261
optcarrot 30 15 30 15
rubykon 30 15 30 15
30k_ifelse 30 47 30 47
30k_methods 30 20 30 20
cfunc_itself 30 466 30 466
fib 30 324 30 324
getivar 30 436 30 436
keyword_args 30 379 30 379
respond_to 30 680 30 680
setivar 30 1341 30 1341
setivar_object 30 424 30 424
str_concat 30 454 30 454

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) 787620 787120 205 1567 1 0% 0 0 0
hexapdf (click) 1056101 1053332 606 9610 18 0% 0 0 0
liquid-c (click) 430970 430184 125 1641 2 0% 0 0 0
liquid-render (click) 469638 468484 147 1945 7 0% 0 0 0
mail (click) 633415 632288 347 4644 9 0% 0 0 0
psych-load (click) 210489 208624 64 576 1 0% 0 0 0
railsbench (click) 2208793 2207536 1355 11344 6 0% 0 0 0
ruby-lsp (click) 4196686 4195868 3393 38619 278 0% 4 0 0
sequel (click) 561253 559584 47 625 0 0% 0 0 0
binarytrees (click) 9444 8800 11 75 0 0% 0 0 0
chunky_png (click) 260416 258352 87 1086 1 0% 0 0 0
erubi (click) 182910 181776 9 83 0 0% 0 0 0
erubi_rails (click) 1417811 1417540 288 2509 1 0% 0 0 0
etanni (click) 12876 11212 11 55 0 0% 0 0 0
fannkuchredux (click) 21041 19712 8 219 0 0% 0 0 0
lee (click) 229727 229592 49 656 0 0% 0 0 0
nbody (click) 17502 16992 10 178 0 0% 0 0 0
optcarrot (click) 353131 352708 195 4304 22 0% 0 0 0
rubykon (click) 147232 144652 144 1608 2 0% 0 0 0
30k_ifelse (click) 5211601 5210888 9263 50805 0 0% 0 0 0
30k_methods (click) 1945680 1944316 5781 19359 0 0% 0 0 0
cfunc_itself (click) 6697 4084 8 61 0 0% 0 0 0
fib (click) 5127 3592 8 49 0 0% 0 0 0
getivar (click) 6373 5184 8 74 0 0% 0 0 0
keyword_args (click) 7405 4460 9 63 0 0% 0 0 0
respond_to (click) 7222 5228 8 76 0 0% 0 0 0
setivar (click) 5406 4352 8 54 0 0% 0 0 0
setivar_object (click) 5741 4352 8 54 0 0% 0 0 0
str_concat (click) 6704 4764 10 72 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.