YJIT Benchmarks

Details for Benchmarks at 2023-09-18 19:08:17

Overall YJIT is 62.2% faster than interpreted CRuby!
On Railsbench specifically, YJIT is 69.6% 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) 689633 635410 51 512 1 0% 0 0 0
chunky-png (click) 280718 272426 87 1103 1 0% 0 0 0
erubi-rails (click) 1503380 1368789 289 2916 1 0% 0 0 0
hexapdf (click) 1262617 1236784 605 12040 21 0% 0 0 0
liquid-c (click) 451103 435362 123 1647 2 0% 0 0 0
liquid-compile (click) 322394 307434 151 2020 2 0% 0 0 0
liquid-render (click) 480330 465975 147 2093 3 0% 0 0 0
lobsters (click) 7281351 6478461 3211 45439 61 0% 0 0 0
mail (click) 645588 605060 348 4752 9 0% 0 0 0
psych-load (click) 239758 226384 65 604 1 0% 0 0 0
railsbench (click) 2342282 2142969 1360 12393 10 0% 0 0 0
ruby-lsp (click) 5055934 4894932 3407 48872 345 0% 4 0 0
sequel (click) 419938 400347 16 128 0 0% 0 0 0
binarytrees (click) 8992 7311 11 75 0 0% 0 0 0
erubi (click) 210517 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) 313613 287300 12 105 0 0% 0 0 0
graphql (click) 368882 339366 70 657 0 0% 0 0 0
graphql-native (click) 335424 300136 42 264 0 0% 0 0 0
lee (click) 258390 246108 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) 217639 205136 31 302 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) 253735 233607 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.