YJIT Benchmarks

Details for Benchmarks at 2023-07-28 19:08:13

Overall YJIT is 58.2% faster than interpreted CRuby!
On Railsbench specifically, YJIT is 64.7% 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 488 30 488
chunky-png 30 30 30 30
erubi-rails 30 1360 30 1360
hexapdf 30 15 30 15
liquid-c 30 345 30 345
liquid-compile 30 334 30 334
liquid-render 30 195 30 195
mail 30 157 30 157
psych-load 30 15 30 15
railsbench 30 15 30 15
ruby-lsp 30 388 30 388
sequel 30 291 30 291
binarytrees 30 85 30 85
erubi 30 79 30 79
etanni 30 54 30 54
fannkuchredux 30 27 30 27
fluentd 30 15 30 15
lee 30 21 30 21
nbody 30 274 30 274
optcarrot 30 15 30 15
rack 30 176 30 176
ruby-json 30 15 30 15
rubykon 30 15 30 15
30k_ifelse 30 56 30 56
30k_methods 30 23 30 23
cfunc_itself 30 543 30 543
fib 30 453 30 453
getivar 30 937 30 937
keyword_args 30 435 30 435
respond_to 30 744 30 744
setivar 30 1663 30 1663
setivar_object 30 475 30 475
setivar_young 30 474 30 474
str_concat 30 479 30 479
throw 30 813 30 813

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) 756177 686280 51 555 1 0% 0 0 0
chunky-png (click) 292876 270738 86 1063 1 0% 0 0 0
erubi-rails (click) 1831490 1559700 288 2904 1 0% 0 0 0
hexapdf (click) 1294933 1270229 600 11740 22 0% 0 0 0
liquid-c (click) 446177 448006 122 1637 3 0% 0 0 0
liquid-compile (click) 333756 322366 149 2025 2 0% 0 0 0
liquid-render (click) 477611 470710 146 1959 8 0% 0 0 0
mail (click) 645580 616692 346 4683 9 0% 0 0 0
psych-load (click) 241972 227274 64 580 1 0% 0 0 0
railsbench (click) 2585562 2307364 1359 12121 11 0% 0 0 0
ruby-lsp (click) 5718183 5347901 3412 50515 338 0% 4 0 0
sequel (click) 418722 408600 15 100 0 0% 0 0 0
binarytrees (click) 8985 7488 11 75 0 0% 0 0 0
erubi (click) 205338 203095 9 83 0 0% 0 0 0
etanni (click) 29396 27322 11 77 0 0% 0 0 0
fannkuchredux (click) 19511 20370 8 219 0 0% 0 0 0
fluentd (click) 359898 321624 12 104 0 0% 0 0 0
lee (click) 254061 247040 49 693 0 0% 0 0 0
nbody (click) 16636 16627 10 178 0 0% 0 0 0
optcarrot (click) 329352 394210 197 4506 22 0% 0 0 0
rack (click) 219859 203845 29 273 0 0% 0 0 0
ruby-json (click) 25567 22347 11 191 0 0% 0 0 0
rubykon (click) 130302 136912 145 1505 2 0% 0 0 0
30k_ifelse (click) 5410784 4368378 9263 50806 0 0% 0 0 0
30k_methods (click) 1981346 1528576 5781 19360 0 0% 0 0 0
cfunc_itself (click) 6328 4947 8 61 0 0% 0 0 0
fib (click) 4858 4454 8 49 0 0% 0 0 0
getivar (click) 6004 5980 8 74 0 0% 0 0 0
keyword_args (click) 7103 5541 9 63 0 0% 0 0 0
respond_to (click) 6865 6857 8 76 0 0% 0 0 0
setivar (click) 5155 4541 8 54 0 0% 0 0 0
setivar_object (click) 5493 4561 8 54 0 0% 0 0 0
setivar_young (click) 6280 5537 9 62 0 0% 0 0 0
str_concat (click) 6732 6350 10 76 0 0% 0 0 0
throw (click) 3939 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.