YJIT Benchmarks

Details for Benchmarks at 2024-02-16 19:08:17 UTC

YJIT metrics from the yjit-bench suite using Ruby bac692f508

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 68.0% faster than CRuby 3.4.0dev
On railsbench it is
  • 75.9% 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 512 30 512
chunky-png 30 32 30 32
erubi-rails 30 19 30 19
hexapdf 30 15 30 15
liquid-c 30 352 30 352
liquid-compile 30 336 30 336
liquid-render 30 251 30 251
lobsters 30 23 30 23
mail 30 163 30 163
psych-load 30 15 30 15
railsbench 30 15 30 15
rubocop 30 183 30 183
ruby-lsp 30 174 30 174
sequel 30 291 30 291
binarytrees 30 83 30 83
blurhash 30 102 30 102
erubi 30 75 30 75
etanni 30 51 30 51
fannkuchredux 30 24 30 24
fluentd 30 15 30 15
graphql 30 15 30 15
graphql-native 30 22 30 22
lee 30 20 30 20
matmul 30 18 30 18
nbody 30 330 30 330
nqueens 30 301 30 301
optcarrot 30 15 30 15
rack 30 180 30 180
ruby-json 30 15 30 15
rubykon 30 15 30 15
sudoku 30 26 30 26
tinygql 30 41 30 41
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 532 30 532
respond_to 30 1459 30 1459
ruby-xor 30 104 30 104
setivar 30 2395 30 2395
setivar_object 30 356 30 356
setivar_young 30 379 30 379
str_concat 30 419 30 419
throw 30 850 30 850

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) 883294 760686 49 522 0 0% 0 0 0 15.614863
chunky-png (click) 333704 291192 87 1095 1 0% 0 0 0 32.018775
erubi-rails (click) 1702696 1440329 280 2953 6 0% 0 0 0 84.79803
hexapdf (click) 1415256 1182328 597 12608 37 0% 0 0 0 370.111629
liquid-c (click) 519809 456109 120 1758 5 0% 0 0 0 48.125972
liquid-compile (click) 442793 397745 151 2058 2 0% 0 0 0 62.509474
liquid-render (click) 620229 557064 144 2272 8 0% 0 0 0 62.447659
lobsters (click) 7904942 6623133 3218 50273 74 0% 0 0 0 1717.240263
mail (click) 729270 603882 346 4849 14 0% 0 0 0 142.57583
psych-load (click) 296646 261563 65 652 3 0% 0 0 0 19.929695
railsbench (click) 2994073 2568486 1643 15635 54 0% 0 0 0 452.46875
rubocop (click) 5356267 4606813 2902 47718 105 0% 4 0 0 1420.609466
ruby-lsp (click) 634761 554482 159 2783 14 0% 0 0 0 78.859783
sequel (click) 495091 422308 16 119 0 0% 0 0 0 4.345121
binarytrees (click) 9392 7588 11 75 0 0% 0 0 0 2.94235
blurhash (click) 52663 47827 32 476 0 0% 0 0 0 15.527924
erubi (click) 258521 217483 10 114 0 0% 0 0 0 3.830337
etanni (click) 31784 27950 12 98 0 0% 0 0 0 3.240641
fannkuchredux (click) 24986 25976 9 259 0 0% 0 0 0 7.863235
fluentd (click) 385079 310554 11 111 0 0% 0 0 0 3.719377
graphql (click) 439557 381430 70 670 0 0% 0 0 0 20.30436
graphql-native (click) 405114 342884 41 268 0 0% 0 0 0 8.702345
lee (click) 313023 278534 49 737 0 0% 0 0 0 23.03176
matmul (click) 12586 12175 12 126 0 0% 0 0 0 4.296283
nbody (click) 15177 7657 11 187 0 0% 0 0 0 5.029545
nqueens (click) 23683 17949 10 263 0 0% 0 0 0 7.761939
optcarrot (click) 317208 278543 192 4345 34 0% 0 0 0 103.631104
rack (click) 269159 235036 31 322 0 0% 0 0 0 9.147048
ruby-json (click) 28209 23153 12 200 0 0% 0 0 0 5.888264
rubykon (click) 133699 106554 143 1500 3 0% 0 0 0 41.701085
sudoku (click) 47007 45195 11 507 0 0% 0 0 0 15.371244
tinygql (click) 310058 258501 63 791 5 0% 0 0 0 23.065747
30k_ifelse (click) 5222671 4374319 9264 50815 0 0% 0 0 0 1451.541241
30k_methods (click) 2019688 1594135 5782 19371 0 0% 0 0 0 521.874813
cfunc_itself (click) 7663 5893 9 72 0 0% 0 0 0 2.318891
fib (click) 5017 4633 8 49 0 0% 0 0 0 1.753886
getivar (click) 6102 6023 8 74 0 0% 0 0 0 2.200942
keyword_args (click) 8526 6585 10 74 0 0% 0 0 0 2.566162
respond_to (click) 8415 7843 9 87 0 0% 0 0 0 2.758395
ruby-xor (click) 8142 7087 9 87 0 0% 0 0 0 2.657599
setivar (click) 5193 4604 8 54 0 0% 0 0 0 1.818121
setivar_object (click) 5561 4624 8 54 0 0% 0 0 0 1.860712
setivar_young (click) 6284 5274 9 62 0 0% 0 0 0 2.061185
str_concat (click) 8006 7287 11 87 0 0% 0 0 0 2.992331
throw (click) 7946 6065 10 69 0 0% 0 0 0 2.387835

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.