YJIT Benchmarks

Details for Benchmarks at 2023-07-18 06:08:15

Overall YJIT is 52.1% faster than interpreted CRuby!
On Railsbench specifically, YJIT is 55.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 471 30 471
chunky-png 30 29 30 29
erubi-rails 30 1260 30 1260
hexapdf 30 15 30 15
liquid-c 30 337 30 337
liquid-compile 30 338 30 338
liquid-render 30 189 30 189
mail 30 149 30 149
psych-load 30 15 30 15
railsbench 30 15 30 15
ruby-lsp 30 361 30 361
sequel 30 281 30 281
binarytrees 30 86 30 86
erubi 30 77 30 77
etanni 30 48 30 48
fannkuchredux 30 26 30 26
lee 30 21 30 21
nbody 30 293 30 293
optcarrot 30 15 30 15
rack 30 183 30 183
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 530 30 530
fib 30 453 30 453
getivar 30 938 30 938
keyword_args 30 415 30 415
respond_to 30 761 30 761
setivar 30 1664 30 1664
setivar_object 30 475 30 475
setivar_young 30 474 30 474
str_concat 30 440 30 440
throw 30 819 30 819

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) 679222 623512 51 432 1 0% 0 0 0
chunky-png (click) 264215 249346 85 1058 1 0% 0 0 0
erubi-rails (click) 1563747 1366613 288 2481 1 0% 0 0 0
hexapdf (click) 1168263 1151299 601 10730 22 0% 0 0 0
liquid-c (click) 409194 416415 125 1581 3 0% 0 0 0
liquid-compile (click) 304816 308786 149 1992 2 0% 0 0 0
liquid-render (click) 441665 448123 146 1883 8 0% 0 0 0
mail (click) 600476 573480 346 4393 9 0% 0 0 0
psych-load (click) 202902 203574 64 570 1 0% 0 0 0
railsbench (click) 2241659 2014796 1355 10890 7 0% 0 0 0
ruby-lsp (click) 5007982 4701811 3402 44566 321 0% 4 0 0
sequel (click) 384731 373923 15 97 0 0% 0 0 0
binarytrees (click) 8985 7488 11 75 0 0% 0 0 0
erubi (click) 177329 182141 9 83 0 0% 0 0 0
etanni (click) 12187 10588 11 55 0 0% 0 0 0
fannkuchredux (click) 19511 20370 8 219 0 0% 0 0 0
lee (click) 219911 220721 49 657 0 0% 0 0 0
nbody (click) 16636 16627 10 178 0 0% 0 0 0
optcarrot (click) 319234 382506 197 4341 22 0% 0 0 0
rack (click) 182578 181424 29 264 0 0% 0 0 0
ruby-json (click) 25372 22131 11 191 0 0% 0 0 0
rubykon (click) 131759 139110 145 1528 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.