YJIT Benchmarks

Details for Benchmarks at 2024-01-23 19:08:16 UTC

YJIT metrics from the yjit-bench suite using Ruby 557b69e83b

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 66.5% faster than CRuby 3.4.0dev
On railsbench it is
  • 71.4% 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 485 30 485
chunky-png 30 30 30 30
erubi-rails 30 15 30 15
hexapdf 30 15 30 15
liquid-c 30 347 30 347
liquid-compile 30 339 30 339
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 172 30 172
ruby-lsp 30 215 30 215
sequel 30 299 30 299
binarytrees 30 83 30 83
blurhash 30 94 30 94
erubi 30 76 30 76
etanni 30 52 30 52
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 182 30 182
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 940 30 940
keyword_args 30 533 30 533
respond_to 30 1440 30 1440
setivar 30 1668 30 1668
setivar_object 30 348 30 348
setivar_young 30 384 30 384
str_concat 30 442 30 442
throw 30 800 30 800

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) 765880 666660 48 518 3 0% 0 0 0 15.463568
chunky-png (click) 315180 301115 87 1076 1 0% 0 0 0 31.745953
erubi-rails (click) 1633332 1419458 287 2901 1 0% 0 0 0 82.166237
hexapdf (click) 1353379 1119852 596 12253 37 0% 0 0 0 362.934173
liquid-c (click) 496659 438528 120 1700 5 0% 0 0 0 47.013949
liquid-compile (click) 421432 379058 151 2014 2 0% 0 0 0 61.667738
liquid-render (click) 591386 540653 143 2188 8 0% 0 0 0 61.312398
lobsters (click) 7603279 6536305 3192 49431 75 0% 0 0 0 1678.749767
mail (click) 693356 605340 345 4769 12 0% 0 0 0 140.619923
psych-load (click) 278157 260958 65 625 3 0% 0 0 0 19.440966
railsbench (click) 2500005 2176178 1367 12720 19 0% 0 0 0 372.460299
rubocop (click) 4886159 4121322 2897 43713 93 0% 4 0 0 1330.515329
ruby-lsp (click) 626204 509461 159 2736 14 0% 0 0 0 78.326023
sequel (click) 466381 401224 16 124 0 0% 0 0 0 5.201241
binarytrees (click) 9291 8120 11 75 0 0% 0 0 0 2.984041
blurhash (click) 51326 46923 32 426 1 0% 0 0 0 14.771737
erubi (click) 252369 213881 10 95 0 0% 0 0 0 3.33567
etanni (click) 30352 20655 12 91 0 0% 0 0 0 3.126413
fannkuchredux (click) 24971 26731 9 259 0 0% 0 0 0 7.946178
fluentd (click) 358423 315939 11 104 0 0% 0 0 0 3.384676
graphql (click) 422547 373549 70 656 0 0% 0 0 0 20.324381
graphql-native (click) 389063 351117 42 261 0 0% 0 0 0 8.691275
lee (click) 294050 261668 49 689 0 0% 0 0 0 22.122994
matmul (click) 12823 4423 12 123 0 0% 0 0 0 4.293629
nbody (click) 18045 16846 11 187 0 0% 0 0 0 5.540403
nqueens (click) 15298 8648 10 160 0 0% 0 0 0 5.02281
optcarrot (click) 303229 236411 197 4239 33 0% 0 0 0 100.703457
rack (click) 251764 217721 31 301 0 0% 0 0 0 8.769621
ruby-json (click) 27348 24919 12 202 0 0% 0 0 0 6.126335
rubykon (click) 127938 92910 144 1464 3 0% 0 0 0 41.075512
sudoku (click) 45221 36695 10 492 0 0% 0 0 0 14.650206
tinygql (click) 290887 249303 63 780 5 0% 0 0 0 22.447342
30k_ifelse (click) 4909438 4374645 9264 50815 0 0% 0 0 0 1397.140879
30k_methods (click) 1850265 1594310 5782 19371 0 0% 0 0 0 498.664556
cfunc_itself (click) 7728 6775 9 72 0 0% 0 0 0 2.457673
fib (click) 5044 5012 8 49 0 0% 0 0 0 1.904412
getivar (click) 6179 6402 8 74 0 0% 0 0 0 2.318317
keyword_args (click) 8341 6984 10 74 0 0% 0 0 0 2.682265
respond_to (click) 8471 8395 9 87 0 0% 0 0 0 2.89862
setivar (click) 5330 4983 8 54 0 0% 0 0 0 1.975632
setivar_object (click) 5668 5003 8 54 0 0% 0 0 0 2.025407
setivar_young (click) 6435 5792 9 62 0 0% 0 0 0 2.272212
str_concat (click) 7993 7737 11 87 0 0% 0 0 0 2.959381
throw (click) 7723 6444 10 69 0 0% 0 0 0 2.409115

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.