YJIT Benchmarks

Details for Benchmarks at 2024-02-12 19:08:15 UTC

YJIT metrics from the yjit-bench suite using Ruby 2131d04f43

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 69.6% faster than CRuby 3.4.0dev
On railsbench it is
  • 68.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 493 30 493
chunky-png 30 30 30 30
erubi-rails 30 19 30 19
hexapdf 30 15 30 15
liquid-c 30 347 30 347
liquid-compile 30 338 30 338
liquid-render 30 251 30 251
lobsters 30 22 30 22
mail 30 161 30 161
psych-load 30 15 30 15
railsbench 30 15 30 15
rubocop 30 182 30 182
ruby-lsp 30 169 30 169
sequel 30 289 30 289
binarytrees 30 83 30 83
blurhash 30 101 30 101
erubi 30 76 30 76
etanni 30 51 30 51
fannkuchredux 30 23 30 23
fluentd 30 15 30 15
graphql 30 15 30 15
graphql-native 30 32 30 32
lee 30 20 30 20
matmul 30 18 30 18
nbody 30 333 30 333
nqueens 30 299 30 299
optcarrot 30 15 30 15
rack 30 173 30 173
ruby-json 30 15 30 15
rubykon 30 15 30 15
sudoku 30 25 30 25
tinygql 30 41 30 41
30k_ifelse 30 55 30 55
30k_methods 30 23 30 23
cfunc_itself 30 826 30 826
fib 30 416 30 416
getivar 30 939 30 939
keyword_args 30 531 30 531
respond_to 30 1457 30 1457
ruby-xor 30 93 30 93
setivar 30 1668 30 1668
setivar_object 30 327 30 327
setivar_young 30 331 30 331
str_concat 30 392 30 392
throw 30 848 30 848

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) 885574 777239 49 522 0 0% 0 0 0 16.186145
chunky-png (click) 335832 301233 87 1104 1 0% 0 0 0 32.533588
erubi-rails (click) 1713661 1437448 280 2944 6 0% 0 0 0 82.557728
hexapdf (click) 1417076 1230625 596 12595 37 0% 0 0 0 370.954176
liquid-c (click) 521071 455986 120 1758 5 0% 0 0 0 47.69832
liquid-compile (click) 445244 398451 151 2067 2 0% 0 0 0 63.554737
liquid-render (click) 621889 565336 144 2271 8 0% 0 0 0 63.075278
lobsters (click) 7954574 6649797 3220 50684 73 0% 0 0 0 1718.438745
mail (click) 730570 644555 346 4849 14 0% 0 0 0 141.90479
psych-load (click) 297361 261332 65 652 3 0% 0 0 0 20.176202
railsbench (click) 2999434 2577602 1644 15619 54 0% 0 0 0 449.030183
rubocop (click) 5362050 4587745 2902 47669 105 0% 4 0 0 1418.720341
ruby-lsp (click) 636456 537968 159 2783 14 0% 0 0 0 77.798435
sequel (click) 484409 423796 16 118 0 0% 0 0 0 4.252751
binarytrees (click) 9392 7588 11 75 0 0% 0 0 0 2.936276
blurhash (click) 52697 47824 32 476 0 0% 0 0 0 15.682269
erubi (click) 268894 230920 10 114 0 0% 0 0 0 3.893681
etanni (click) 31783 27950 12 98 0 0% 0 0 0 3.286788
fannkuchredux (click) 24986 25976 9 259 0 0% 0 0 0 7.918142
fluentd (click) 385937 326837 11 111 0 0% 0 0 0 3.604761
graphql (click) 439941 372795 70 670 0 0% 0 0 0 20.596887
graphql-native (click) 406114 334888 42 273 0 0% 0 0 0 8.873862
lee (click) 303813 273034 49 737 0 0% 0 0 0 23.111928
matmul (click) 12586 12175 12 126 0 0% 0 0 0 4.226325
nbody (click) 15213 7657 11 187 0 0% 0 0 0 5.088314
nqueens (click) 23683 17949 10 263 0 0% 0 0 0 7.870679
optcarrot (click) 320147 245517 192 4345 34 0% 0 0 0 104.343973
rack (click) 270133 234996 31 325 0 0% 0 0 0 9.332511
ruby-json (click) 28208 23153 12 200 0 0% 0 0 0 5.940707
rubykon (click) 133942 122908 143 1500 3 0% 0 0 0 41.97148
sudoku (click) 47007 45195 11 507 0 0% 0 0 0 15.423316
tinygql (click) 310901 266745 63 792 5 0% 0 0 0 23.050982
30k_ifelse (click) 5222688 4374316 9264 50815 0 0% 0 0 0 1460.702629
30k_methods (click) 2019699 1594292 5782 19371 0 0% 0 0 0 521.953059
cfunc_itself (click) 7663 5893 9 72 0 0% 0 0 0 2.272419
fib (click) 5017 4633 8 49 0 0% 0 0 0 1.780497
getivar (click) 6102 6023 8 74 0 0% 0 0 0 2.139285
keyword_args (click) 8526 6585 10 74 0 0% 0 0 0 2.547649
respond_to (click) 8415 7843 9 87 0 0% 0 0 0 2.713348
ruby-xor (click) 7544 6739 9 81 0 0% 0 0 0 2.660804
setivar (click) 5253 4604 8 54 0 0% 0 0 0 1.747669
setivar_object (click) 5591 4624 8 54 0 0% 0 0 0 1.787844
setivar_young (click) 6343 5271 9 62 0 0% 0 0 0 2.003057
str_concat (click) 8006 7287 11 87 0 0% 0 0 0 2.902372
throw (click) 7946 6065 10 69 0 0% 0 0 0 2.397402

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.