YJIT Benchmarks

Details for Benchmarks at 2024-02-15 06:08:16 UTC

YJIT metrics from the yjit-bench suite using Ruby c57880e68d

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 68.4% faster than CRuby 3.4.0dev
On railsbench it is
  • 70.2% faster than CRuby 3.4.0dev

Performance on Headline Benchmarks

Speed of each Ruby implementation relative to the baseline CRuby measurement. Higher is better.

Memory Usage on Headline Benchmarks

Memory usage of each Ruby implementation relative to the baseline CRuby measurement. Lower is better.

Performance on Other Benchmarks

Speed of each Ruby implementation relative to the baseline CRuby measurement. Higher is better.

Memory Usage on Other Benchmarks

Memory usage of each Ruby implementation relative to the baseline CRuby measurement. Lower is better.

Performance on MicroBenchmarks

Speed of each Ruby implementation relative to the baseline CRuby measurement. Higher is better.

Memory Usage on MicroBenchmarks

Memory usage of each Ruby implementation relative to the baseline CRuby measurement. Lower is better.

Want Raw Graphs and CSV?

Benchmarks Speed Details

Benchmark Memory Usage Details

Number of Iterations and Warmups Tested

bench CRuby 3.4.0dev warmups CRuby 3.4.0dev iters YJIT 3.4.0dev warmups YJIT 3.4.0dev iters
activerecord 30 502 30 502
chunky-png 30 31 30 31
erubi-rails 30 19 30 19
hexapdf 30 15 30 15
liquid-c 30 346 30 346
liquid-compile 30 335 30 335
liquid-render 30 248 30 248
lobsters 30 23 30 23
mail 30 163 30 163
psych-load 30 15 30 15
railsbench 30 15 30 15
rubocop 30 184 30 184
ruby-lsp 30 182 30 182
sequel 30 285 30 285
binarytrees 30 87 30 87
blurhash 30 99 30 99
erubi 30 76 30 76
etanni 30 52 30 52
fannkuchredux 30 23 30 23
fluentd 30 15 30 15
graphql 30 15 30 15
graphql-native 30 22 30 22
lee 30 19 30 19
matmul 30 17 30 17
nbody 30 312 30 312
nqueens 30 301 30 301
optcarrot 30 15 30 15
rack 30 177 30 177
ruby-json 30 15 30 15
rubykon 30 15 30 15
sudoku 30 25 30 25
tinygql 30 40 30 40
30k_ifelse 30 55 30 55
30k_methods 30 23 30 23
cfunc_itself 30 827 30 827
fib 30 416 30 416
getivar 30 944 30 944
keyword_args 30 531 30 531
respond_to 30 1459 30 1459
ruby-xor 30 86 30 86
setivar 30 1668 30 1668
setivar_object 30 358 30 358
setivar_young 30 361 30 361
str_concat 30 414 30 414
throw 30 821 30 821

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 Compile Time MS
activerecord (click) 885132 776712 49 522 0 0% 0 0 0 15.591701
chunky-png (click) 324485 293859 87 1095 1 0% 0 0 0 32.11594
erubi-rails (click) 1707280 1406825 281 2884 6 0% 0 0 0 80.763806
hexapdf (click) 1417552 1190110 596 12606 37 0% 0 0 0 370.484386
liquid-c (click) 520667 455765 120 1758 5 0% 0 0 0 48.046941
liquid-compile (click) 444337 398106 151 2064 2 0% 0 0 0 63.701628
liquid-render (click) 621553 556904 144 2271 8 0% 0 0 0 62.670206
lobsters (click) 7926126 6622724 3220 50425 72 0% 0 0 0 1720.952101
mail (click) 720759 622994 346 4849 14 0% 0 0 0 142.328871
psych-load (click) 287262 255858 65 650 3 0% 0 0 0 20.04814
railsbench (click) 2997879 2534771 1643 15620 54 0% 0 0 0 452.766598
rubocop (click) 5360092 4520083 2902 47664 105 0% 4 0 0 1416.586823
ruby-lsp (click) 626428 540743 159 2816 14 0% 0 0 0 77.465466
sequel (click) 498320 416448 16 117 0 0% 0 0 0 4.236288
binarytrees (click) 9392 7588 11 75 0 0% 0 0 0 2.950524
blurhash (click) 52697 47824 32 476 0 0% 0 0 0 15.651171
erubi (click) 259087 217427 10 114 0 0% 0 0 0 3.871595
etanni (click) 31783 27950 12 98 0 0% 0 0 0 3.292186
fannkuchredux (click) 24986 25976 9 259 0 0% 0 0 0 7.818399
fluentd (click) 385769 335113 11 111 0 0% 0 0 0 3.672802
graphql (click) 430040 367467 70 670 0 0% 0 0 0 20.308762
graphql-native (click) 395587 337059 41 268 0 0% 0 0 0 8.726076
lee (click) 313620 262149 49 737 0 0% 0 0 0 23.090759
matmul (click) 12586 12175 12 126 0 0% 0 0 0 4.234672
nbody (click) 15213 7657 11 187 0 0% 0 0 0 5.012137
nqueens (click) 23683 17949 10 263 0 0% 0 0 0 7.782887
optcarrot (click) 319946 286129 192 4345 34 0% 0 0 0 104.359809
rack (click) 259958 213080 31 322 0 0% 0 0 0 9.134565
ruby-json (click) 28208 23153 12 200 0 0% 0 0 0 5.889573
rubykon (click) 133942 122908 143 1500 3 0% 0 0 0 42.145776
sudoku (click) 47007 45195 11 507 0 0% 0 0 0 15.397588
tinygql (click) 300966 244786 63 791 5 0% 0 0 0 23.261858
30k_ifelse (click) 5222688 4374316 9264 50815 0 0% 0 0 0 1462.326368
30k_methods (click) 2019699 1594292 5782 19371 0 0% 0 0 0 526.14222
cfunc_itself (click) 7663 5893 9 72 0 0% 0 0 0 2.305914
fib (click) 5017 4633 8 49 0 0% 0 0 0 1.745539
getivar (click) 6102 6023 8 74 0 0% 0 0 0 2.194328
keyword_args (click) 8526 6585 10 74 0 0% 0 0 0 2.525511
respond_to (click) 8415 7843 9 87 0 0% 0 0 0 2.700658
ruby-xor (click) 8142 7087 9 87 0 0% 0 0 0 2.7373
setivar (click) 5253 4604 8 54 0 0% 0 0 0 1.870206
setivar_object (click) 5591 4624 8 54 0 0% 0 0 0 1.818121
setivar_young (click) 6343 5271 9 62 0 0% 0 0 0 2.033726
str_concat (click) 8006 7287 11 87 0 0% 0 0 0 2.924087
throw (click) 7946 6065 10 69 0 0% 0 0 0 2.409297

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.