YJIT Benchmarks

Details for Benchmarks at 2024-01-24 06:08:13 UTC

YJIT metrics from the yjit-bench suite using Ruby 270ad76359

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
  • 74.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 481 30 481
chunky-png 30 30 30 30
erubi-rails 30 15 30 15
hexapdf 30 15 30 15
liquid-c 30 348 30 348
liquid-compile 30 341 30 341
liquid-render 30 247 30 247
lobsters 30 23 30 23
mail 30 164 30 164
psych-load 30 15 30 15
railsbench 30 15 30 15
rubocop 30 171 30 171
ruby-lsp 30 216 30 216
sequel 30 300 30 300
binarytrees 30 84 30 84
blurhash 30 94 30 94
erubi 30 77 30 77
etanni 30 51 30 51
fannkuchredux 30 24 30 24
fluentd 30 15 30 15
graphql 30 15 30 15
graphql-native 30 33 30 33
lee 30 19 30 19
matmul 30 15 30 15
nbody 30 267 30 267
nqueens 30 75 30 75
optcarrot 30 15 30 15
rack 30 184 30 184
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 533 30 533
respond_to 30 1439 30 1439
setivar 30 1668 30 1668
setivar_object 30 349 30 349
setivar_young 30 380 30 380
str_concat 30 442 30 442
throw 30 802 30 802

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) 777941 694107 48 525 3 0% 0 0 0 15.73101
chunky-png (click) 319116 279904 87 1106 1 0% 0 0 0 32.780727
erubi-rails (click) 1677440 1484057 287 2964 1 0% 0 0 0 84.157306
hexapdf (click) 1357245 1204704 596 12270 37 0% 0 0 0 362.007442
liquid-c (click) 505577 454554 120 1768 5 0% 0 0 0 48.773714
liquid-compile (click) 426164 383349 151 2052 2 0% 0 0 0 63.69599
liquid-render (click) 601311 549436 143 2267 8 0% 0 0 0 63.380649
lobsters (click) 7647537 6519398 3204 49674 76 0% 0 0 0 1674.675961
mail (click) 699861 635784 345 4827 12 0% 0 0 0 142.869589
psych-load (click) 281774 247684 65 651 3 0% 0 0 0 20.381088
railsbench (click) 2545669 2217562 1366 12844 19 0% 0 0 0 378.224673
rubocop (click) 4955528 4209140 2901 44294 99 0% 4 0 0 1333.589
ruby-lsp (click) 630429 570457 159 2765 14 0% 0 0 0 78.380354
sequel (click) 470653 404788 16 124 0 0% 0 0 0 5.085209
binarytrees (click) 9291 8120 11 75 0 0% 0 0 0 3.017983
blurhash (click) 55111 50797 32 478 0 0% 0 0 0 16.231922
erubi (click) 254838 207584 10 114 0 0% 0 0 0 3.90148
etanni (click) 31947 30258 12 98 0 0% 0 0 0 3.503733
fannkuchredux (click) 24971 26731 9 259 0 0% 0 0 0 7.896395
fluentd (click) 361674 311084 11 111 0 0% 0 0 0 3.687613
graphql (click) 425405 359530 70 668 0 0% 0 0 0 20.695366
graphql-native (click) 392004 345333 42 273 0 0% 0 0 0 9.19665
lee (click) 299478 257919 49 734 0 0% 0 0 0 23.419229
matmul (click) 12823 4423 12 123 0 0% 0 0 0 4.325861
nbody (click) 18045 16846 11 187 0 0% 0 0 0 5.523041
nqueens (click) 15298 8648 10 160 0 0% 0 0 0 5.033535
optcarrot (click) 309424 283158 197 4272 34 0% 0 0 0 101.617374
rack (click) 254846 228662 31 322 0 0% 0 0 0 9.415528
ruby-json (click) 28225 25685 12 202 0 0% 0 0 0 6.197586
rubykon (click) 132372 104985 145 1506 3 0% 0 0 0 42.283923
sudoku (click) 46825 38098 11 507 0 0% 0 0 0 15.142165
tinygql (click) 293076 251139 63 792 5 0% 0 0 0 22.800908
30k_ifelse (click) 4909438 4374645 9264 50815 0 0% 0 0 0 1397.816672
30k_methods (click) 1850265 1594310 5782 19371 0 0% 0 0 0 498.635031
cfunc_itself (click) 7728 6775 9 72 0 0% 0 0 0 2.459031
fib (click) 5044 5012 8 49 0 0% 0 0 0 1.922793
getivar (click) 6179 6402 8 74 0 0% 0 0 0 2.352098
keyword_args (click) 8341 6984 10 74 0 0% 0 0 0 2.690946
respond_to (click) 8471 8395 9 87 0 0% 0 0 0 2.936632
setivar (click) 5330 4983 8 54 0 0% 0 0 0 1.99733
setivar_object (click) 5668 5003 8 54 0 0% 0 0 0 2.044684
setivar_young (click) 6435 5792 9 62 0 0% 0 0 0 2.29381
str_concat (click) 7993 7737 11 87 0 0% 0 0 0 2.982912
throw (click) 7723 6444 10 69 0 0% 0 0 0 2.38196

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.