YJIT Benchmarks

Details for Benchmarks at 2023-07-10 06:08:16

Overall YJIT is 49.9% faster than interpreted CRuby!
On Railsbench specifically, YJIT is 52.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 YJIT warmups YJIT iters
activerecord 30 464 30 464
chunky-png 30 31 30 31
erubi-rails 30 1275 30 1275
hexapdf 30 15 30 15
liquid-c 30 334 30 334
liquid-compile 30 340 30 340
liquid-render 30 191 30 191
mail 30 148 30 148
psych-load 30 15 30 15
railsbench 30 15 30 15
ruby-lsp 30 360 30 360
sequel 30 283 30 283
binarytrees 30 86 30 86
erubi 30 78 30 78
etanni 30 49 30 49
fannkuchredux 30 26 30 26
lee 30 21 30 21
nbody 30 264 30 264
optcarrot 30 15 30 15
ruby-json 30 15 30 15
rubykon 30 15 30 15
30k_ifelse 30 55 30 55
30k_methods 30 23 30 23
cfunc_itself 30 500 30 500
fib 30 447 30 447
getivar 30 945 30 945
keyword_args 30 408 30 408
respond_to 30 790 30 790
setivar 30 1667 30 1667
setivar_object 30 431 30 431
setivar_young 30 473 30 473
str_concat 30 475 30 475
throw 30 823 30 823

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) 679853 625448 51 432 1 0% 0 0 0
chunky-png (click) 258682 249755 86 1063 1 0% 0 0 0
erubi-rails (click) 1655219 1367969 288 2476 1 0% 0 0 0
hexapdf (click) 1170878 1151860 600 10733 22 0% 0 0 0
liquid-c (click) 416782 422192 125 1634 3 0% 0 0 0
liquid-compile (click) 308394 309710 149 1998 2 0% 0 0 0
liquid-render (click) 447405 450744 146 1902 8 0% 0 0 0
mail (click) 653690 616949 346 4836 9 0% 0 0 0
psych-load (click) 204886 203777 64 572 1 0% 0 0 0
railsbench (click) 2351984 2044884 1355 11205 7 0% 0 0 0
ruby-lsp (click) 5162954 4703187 3402 44583 320 0% 4 0 0
sequel (click) 398925 376908 15 97 0 0% 0 0 0
binarytrees (click) 9076 7468 11 75 0 0% 0 0 0
erubi (click) 178711 182146 9 83 0 0% 0 0 0
etanni (click) 12317 10568 11 55 0 0% 0 0 0
fannkuchredux (click) 19589 20370 8 219 0 0% 0 0 0
lee (click) 238160 220701 49 657 0 0% 0 0 0
nbody (click) 16822 16627 10 178 0 0% 0 0 0
optcarrot (click) 321041 382506 197 4341 22 0% 0 0 0
ruby-json (click) 25063 21660 12 185 0 0% 0 0 0
rubykon (click) 142794 149099 145 1627 2 0% 0 0 0
30k_ifelse (click) 5362743 4368508 9263 50806 0 0% 0 0 0
30k_methods (click) 1992158 1528536 5781 19360 0 0% 0 0 0
cfunc_itself (click) 6422 4947 8 61 0 0% 0 0 0
fib (click) 4917 4454 8 49 0 0% 0 0 0
getivar (click) 6058 5980 8 74 0 0% 0 0 0
keyword_args (click) 7197 5541 9 63 0 0% 0 0 0
respond_to (click) 6928 6857 8 76 0 0% 0 0 0
setivar (click) 5209 4541 8 54 0 0% 0 0 0
setivar_object (click) 5544 4561 8 54 0 0% 0 0 0
setivar_young (click) 6335 5537 9 62 0 0% 0 0 0
str_concat (click) 6802 6350 10 76 0 0% 0 0 0
throw (click) 3993 3228 10 37 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.