YJIT Benchmarks

Details for Benchmarks at 2023-09-16 19:08:16

Overall YJIT is 60.6% faster than interpreted CRuby!
On Railsbench specifically, YJIT is 68.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 475 30 475
chunky-png 30 32 30 32
erubi-rails 30 1436 30 1436
hexapdf 30 15 30 15
liquid-c 30 360 30 360
liquid-compile 30 338 30 338
liquid-render 30 243 30 243
lobsters 30 22 30 22
mail 30 160 30 160
psych-load 30 15 30 15
railsbench 30 15 30 15
ruby-lsp 30 390 30 390
sequel 30 313 30 313
binarytrees 30 87 30 87
erubi 30 79 30 79
etanni 30 53 30 53
fannkuchredux 30 26 30 26
fluentd 30 15 30 15
graphql 30 15 30 15
graphql-native 30 38 30 38
lee 30 21 30 21
nbody 30 279 30 279
optcarrot 30 15 30 15
rack 30 185 30 185
ruby-json 30 15 30 15
rubykon 30 15 30 15
tinygql 30 27 30 27
30k_ifelse 30 56 30 56
30k_methods 30 23 30 23
cfunc_itself 30 749 30 749
fib 30 468 30 468
getivar 30 929 30 929
keyword_args 30 551 30 551
respond_to 30 1208 30 1208
setivar 30 1666 30 1666
setivar_object 30 475 30 475
setivar_young 30 473 30 473
str_concat 30 453 30 453
throw 30 786 30 786

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) 694396 639617 51 521 1 0% 0 0 0
chunky-png (click) 283441 274500 87 1103 1 0% 0 0 0
erubi-rails (click) 1504325 1369722 289 2926 1 0% 0 0 0
hexapdf (click) 1262576 1236692 605 12042 21 0% 0 0 0
liquid-c (click) 450553 434946 123 1650 2 0% 0 0 0
liquid-compile (click) 323318 308304 151 2027 2 0% 0 0 0
liquid-render (click) 479795 465151 147 2093 3 0% 0 0 0
lobsters (click) 7229008 6436998 3211 45232 45 0% 0 0 0
mail (click) 645513 605042 348 4752 9 0% 0 0 0
psych-load (click) 239139 225877 65 604 1 0% 0 0 0
railsbench (click) 2338488 2139537 1360 12380 10 0% 0 0 0
ruby-lsp (click) 5053486 4891860 3407 48863 344 0% 4 0 0
sequel (click) 423144 404037 16 120 0 0% 0 0 0
binarytrees (click) 8992 7311 11 75 0 0% 0 0 0
erubi (click) 206684 201926 10 95 0 0% 0 0 0
etanni (click) 30601 28271 12 89 0 0% 0 0 0
fannkuchredux (click) 24036 25281 9 256 0 0% 0 0 0
fluentd (click) 313065 286834 12 105 0 0% 0 0 0
graphql (click) 368335 338890 70 657 0 0% 0 0 0
graphql-native (click) 334877 299682 42 264 0 0% 0 0 0
lee (click) 257915 245723 49 690 0 0% 0 0 0
nbody (click) 17300 15394 11 189 0 0% 0 0 0
optcarrot (click) 297282 324127 198 4087 21 0% 0 0 0
rack (click) 216859 204600 31 301 0 0% 0 0 0
ruby-json (click) 26538 22657 12 202 0 0% 0 0 0
rubykon (click) 126412 128466 146 1470 2 0% 0 0 0
tinygql (click) 242726 224297 62 642 2 0% 0 0 0
30k_ifelse (click) 4902466 4277959 9264 50817 0 0% 0 0 0
30k_methods (click) 1843183 1529450 5782 19371 0 0% 0 0 0
cfunc_itself (click) 7418 5993 9 73 0 0% 0 0 0
fib (click) 4866 4487 8 49 0 0% 0 0 0
getivar (click) 6012 6013 8 74 0 0% 0 0 0
keyword_args (click) 8198 6592 10 75 0 0% 0 0 0
respond_to (click) 7954 7993 9 88 0 0% 0 0 0
setivar (click) 5163 4574 8 54 0 0% 0 0 0
setivar_object (click) 5501 4594 8 54 0 0% 0 0 0
setivar_young (click) 6233 5255 9 62 0 0% 0 0 0
str_concat (click) 7769 7296 11 87 0 0% 0 0 0
throw (click) 7556 5936 10 69 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.