YJIT Benchmarks

Details for Benchmarks at 2023-09-19 06:08:14

Overall YJIT is 61.4% faster than interpreted CRuby!
On Railsbench specifically, YJIT is 67.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) 694898 639572 51 512 1 0% 0 0 0
chunky-png (click) 287810 278788 87 1103 1 0% 0 0 0
erubi-rails (click) 1503199 1368567 289 2914 1 0% 0 0 0
hexapdf (click) 1263123 1237083 605 12042 21 0% 0 0 0
liquid-c (click) 451101 435362 123 1650 2 0% 0 0 0
liquid-compile (click) 324096 309001 151 2033 2 0% 0 0 0
liquid-render (click) 479795 465151 147 2093 3 0% 0 0 0
lobsters (click) 7279625 6475349 3211 45428 61 0% 0 0 0
mail (click) 645591 605146 348 4752 9 0% 0 0 0
psych-load (click) 239763 226384 65 604 1 0% 0 0 0
railsbench (click) 2341857 2142083 1360 12390 10 0% 0 0 0
ruby-lsp (click) 5055340 4894480 3407 48872 344 0% 4 0 0
sequel (click) 422551 403447 16 122 0 0% 0 0 0
binarytrees (click) 8992 7311 11 75 0 0% 0 0 0
erubi (click) 210522 204863 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) 313618 287353 12 105 0 0% 0 0 0
graphql (click) 368994 339427 70 657 0 0% 0 0 0
graphql-native (click) 335370 300076 42 264 0 0% 0 0 0
lee (click) 258467 246139 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) 214198 202598 31 301 0 0% 0 0 0
ruby-json (click) 26538 22657 12 202 0 0% 0 0 0
rubykon (click) 126063 128243 146 1468 2 0% 0 0 0
tinygql (click) 253742 233627 62 762 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.