YJIT Benchmarks

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

Overall YJIT is 62.5% faster than interpreted CRuby!
On Railsbench specifically, YJIT is 69.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) 694951 637642 51 522 1 0% 0 0 0
chunky-png (click) 284288 274500 87 1103 1 0% 0 0 0
erubi-rails (click) 1507121 1368075 289 2914 1 0% 0 0 0
hexapdf (click) 1271026 1240598 606 12045 21 0% 0 0 0
liquid-c (click) 452131 435208 123 1650 2 0% 0 0 0
liquid-compile (click) 323050 307315 151 2018 2 0% 0 0 0
liquid-render (click) 481249 465171 147 2093 3 0% 0 0 0
lobsters (click) 7265946 6434802 3211 45184 45 0% 0 0 0
mail (click) 648086 604994 348 4752 9 0% 0 0 0
psych-load (click) 239862 225917 65 604 1 0% 0 0 0
railsbench (click) 2347222 2139034 1360 12387 10 0% 0 0 0
ruby-lsp (click) 5076408 4891902 3407 48869 343 0% 4 0 0
sequel (click) 421677 400613 16 128 0 0% 0 0 0
binarytrees (click) 9022 7311 11 75 0 0% 0 0 0
erubi (click) 207227 201951 10 95 0 0% 0 0 0
etanni (click) 30628 28271 12 89 0 0% 0 0 0
fannkuchredux (click) 24048 25281 9 256 0 0% 0 0 0
fluentd (click) 313855 286867 12 105 0 0% 0 0 0
graphql (click) 369210 338897 70 657 0 0% 0 0 0
graphql-native (click) 335647 299631 42 264 0 0% 0 0 0
lee (click) 258615 245708 49 690 0 0% 0 0 0
nbody (click) 17315 15394 11 189 0 0% 0 0 0
optcarrot (click) 298230 324127 198 4087 21 0% 0 0 0
rack (click) 218761 206527 31 323 0 0% 0 0 0
ruby-json (click) 26583 22657 12 202 0 0% 0 0 0
rubykon (click) 126901 128486 146 1470 2 0% 0 0 0
tinygql (click) 243521 224246 62 642 2 0% 0 0 0
30k_ifelse (click) 4940113 4277984 9264 50817 0 0% 0 0 0
30k_methods (click) 1863525 1529460 5782 19371 0 0% 0 0 0
cfunc_itself (click) 7430 5993 9 73 0 0% 0 0 0
fib (click) 4881 4487 8 49 0 0% 0 0 0
getivar (click) 6021 6013 8 74 0 0% 0 0 0
keyword_args (click) 8240 6592 10 75 0 0% 0 0 0
respond_to (click) 7966 7993 9 88 0 0% 0 0 0
setivar (click) 5172 4574 8 54 0 0% 0 0 0
setivar_object (click) 5510 4594 8 54 0 0% 0 0 0
setivar_young (click) 6242 5255 9 62 0 0% 0 0 0
str_concat (click) 7787 7296 11 87 0 0% 0 0 0
throw (click) 7601 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.