YJIT Benchmarks

Details for Benchmarks at 2024-02-08 06:08:13 UTC

YJIT metrics from the yjit-bench suite using Ruby 43af20602e

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 68.8% faster than CRuby 3.4.0dev
On railsbench it is
  • 76.0% 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 488 30 488
chunky-png 30 31 30 31
erubi-rails 30 19 30 19
hexapdf 30 15 30 15
liquid-c 30 347 30 347
liquid-compile 30 336 30 336
liquid-render 30 248 30 248
lobsters 30 22 30 22
mail 30 162 30 162
psych-load 30 15 30 15
railsbench 30 15 30 15
rubocop 30 177 30 177
ruby-lsp 30 212 30 212
sequel 30 289 30 289
binarytrees 30 84 30 84
blurhash 30 99 30 99
erubi 30 75 30 75
etanni 30 52 30 52
fannkuchredux 30 24 30 24
fluentd 30 15 30 15
graphql 30 15 30 15
graphql-native 30 28 30 28
lee 30 20 30 20
matmul 30 18 30 18
nbody 30 310 30 310
nqueens 30 305 30 305
optcarrot 30 15 30 15
rack 30 181 30 181
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 417 30 417
getivar 30 941 30 941
keyword_args 30 533 30 533
respond_to 30 1440 30 1440
ruby-xor 30 92 30 92
setivar 30 1668 30 1668
setivar_object 30 292 30 292
setivar_young 30 353 30 353
str_concat 30 395 30 395
throw 30 818 30 818

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) 858006 792423 49 534 0 0% 0 0 0 16.1081
chunky-png (click) 325356 280930 87 1104 1 0% 0 0 0 32.620362
erubi-rails (click) 1673960 1454031 280 2936 6 0% 0 0 0 82.436824
hexapdf (click) 1368693 1244815 597 12434 37 0% 0 0 0 367.292939
liquid-c (click) 502006 424951 119 1762 5 0% 0 0 0 48.577688
liquid-compile (click) 430875 375140 151 2051 2 0% 0 0 0 62.719139
liquid-render (click) 606966 525733 143 2272 8 0% 0 0 0 62.874004
lobsters (click) 7550662 6356322 3224 50078 72 0% 0 0 0 1683.004964
mail (click) 706373 595798 345 4833 14 0% 0 0 0 142.099521
psych-load (click) 288012 256924 65 649 3 0% 0 0 0 20.162261
railsbench (click) 2914163 2590979 1642 15563 54 0% 0 0 0 445.012047
rubocop (click) 4950700 4231763 2901 44357 100 0% 4 0 0 1334.268353
ruby-lsp (click) 618692 525101 159 2792 14 0% 0 0 0 78.557121
sequel (click) 479645 414183 16 119 0 0% 0 0 0 4.578753
binarytrees (click) 9143 8108 11 75 0 0% 0 0 0 2.952071
blurhash (click) 51449 50179 32 478 0 0% 0 0 0 15.678883
erubi (click) 261109 233379 10 114 0 0% 0 0 0 3.822417
etanni (click) 31551 30158 12 98 0 0% 0 0 0 3.34268
fannkuchredux (click) 24892 26732 9 259 0 0% 0 0 0 8.023205
fluentd (click) 375047 321528 11 111 0 0% 0 0 0 3.656245
graphql (click) 426510 343386 70 668 0 0% 0 0 0 20.566457
graphql-native (click) 392414 353092 41 268 0 0% 0 0 0 8.838345
lee (click) 304357 274993 49 734 0 0% 0 0 0 23.032611
matmul (click) 12467 4614 12 126 0 0% 0 0 0 4.219032
nbody (click) 15120 16376 11 187 0 0% 0 0 0 5.0841
nqueens (click) 23567 27084 10 263 0 0% 0 0 0 7.795629
optcarrot (click) 312040 304710 194 4321 34 0% 0 0 0 103.475413
rack (click) 257571 237030 31 322 0 0% 0 0 0 9.198482
ruby-json (click) 27898 25598 12 202 0 0% 0 0 0 6.122655
rubykon (click) 131010 79614 145 1502 3 0% 0 0 0 42.201861
sudoku (click) 46746 38099 11 507 0 0% 0 0 0 15.230404
tinygql (click) 299551 236051 63 792 5 0% 0 0 0 22.768113
30k_ifelse (click) 4909290 4374633 9264 50815 0 0% 0 0 0 1408.989272
30k_methods (click) 1850186 1594311 5782 19371 0 0% 0 0 0 502.217855
cfunc_itself (click) 7580 6763 9 72 0 0% 0 0 0 2.364261
fib (click) 4896 5000 8 49 0 0% 0 0 0 1.814273
getivar (click) 6031 6390 8 74 0 0% 0 0 0 2.248321
keyword_args (click) 8193 6972 10 74 0 0% 0 0 0 2.560336
respond_to (click) 8323 191 9 87 0 0% 0 0 0 2.753405
ruby-xor (click) 7503 7326 9 81 0 0% 0 0 0 2.606989
setivar (click) 5182 4971 8 54 0 0% 0 0 0 1.835787
setivar_object (click) 5520 4991 8 54 0 0% 0 0 0 1.913709
setivar_young (click) 6287 5780 9 62 0 0% 0 0 0 2.21165
str_concat (click) 7845 7725 11 87 0 0% 0 0 0 2.846787
throw (click) 7575 6432 10 69 0 0% 0 0 0 2.354424

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.