YJIT Benchmarks

Details for Benchmarks at 2023-02-11 06:08:06

Overall YJIT is 41.5% faster than interpreted CRuby!
On Railsbench specifically, YJIT is 49.3% 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 184 30 184
hexapdf 30 15 30 15
liquid-c 30 333 30 333
liquid-render 30 179 30 179
mail 30 145 30 145
psych-load 30 15 30 15
railsbench 30 15 30 15
ruby-lsp 30 299 30 299
sequel 30 135 30 135
binarytrees 30 85 30 85
chunky_png 30 31 30 31
erubi 30 78 30 78
erubi_rails 30 1217 30 1217
etanni 30 49 30 49
fannkuchredux 30 21 30 21
lee 30 21 30 21
nbody 30 277 30 277
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 467 30 467
fib 30 321 30 321
getivar 30 436 30 436
keyword_args 30 379 30 379
respond_to 30 689 30 689
setivar 30 1341 30 1341
setivar_object 30 421 30 421
str_concat 30 452 30 452

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) 778561 778436 205 1529 1 0% 0 0 0
hexapdf (click) 1039096 1036700 607 9048 17 0% 0 0 0
liquid-c (click) 429297 428108 125 1565 2 0% 0 0 0
liquid-render (click) 466248 463088 147 1895 7 0% 0 0 0
mail (click) 643659 641716 347 4719 9 0% 0 0 0
psych-load (click) 206926 206028 64 566 1 0% 0 0 0
railsbench (click) 2219550 2216960 1366 11190 12 0% 0 0 0
ruby-lsp (click) 4019086 4017568 3353 35119 296 0% 16454 0 0
sequel (click) 569296 567576 47 614 0 0% 0 0 0
binarytrees (click) 9563 8968 11 75 0 0% 0 0 0
chunky_png (click) 256768 255656 86 1076 1 0% 0 0 0
erubi (click) 181056 180616 9 83 0 0% 0 0 0
erubi_rails (click) 1414354 1412868 290 2372 2 0% 0 0 0
etanni (click) 12838 11084 11 55 0 0% 0 0 0
fannkuchredux (click) 20600 19080 8 205 0 0% 0 0 0
lee (click) 226410 225008 49 635 0 0% 0 0 0
nbody (click) 17081 16776 10 178 0 0% 0 0 0
optcarrot (click) 231595 230712 195 2758 18 0% 0 0 0
rubykon (click) 142304 141216 144 1554 3 0% 0 0 0
30k_ifelse (click) 5192484 5190264 9263 50805 0 0% 0 0 0
30k_methods (click) 1945630 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.