YJIT Benchmarks

Details for Benchmarks at 2024-02-07 06:08:15 UTC

YJIT metrics from the yjit-bench suite using Ruby 8bd83bb133

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 67.5% faster than CRuby 3.4.0dev
On railsbench it is
  • 66.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 489 30 489
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 339 30 339
liquid-render 30 245 30 245
lobsters 30 22 30 22
mail 30 164 30 164
psych-load 30 15 30 15
railsbench 30 15 30 15
rubocop 30 177 30 177
ruby-lsp 30 213 30 213
sequel 30 289 30 289
binarytrees 30 84 30 84
blurhash 30 102 30 102
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 20 30 20
matmul 30 18 30 18
nbody 30 336 30 336
nqueens 30 302 30 302
optcarrot 30 15 30 15
rack 30 179 30 179
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 1439 30 1439
ruby-xor 30 93 30 93
setivar 30 1668 30 1668
setivar_object 30 298 30 298
setivar_young 30 360 30 360
str_concat 30 396 30 396
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) 854142 758703 49 534 0 0% 0 0 0 16.119684
chunky-png (click) 321567 296192 87 1104 1 0% 0 0 0 32.730404
erubi-rails (click) 1665924 1473305 280 2901 6 0% 0 0 0 82.407977
hexapdf (click) 1365083 1153526 596 12432 37 0% 0 0 0 367.492745
liquid-c (click) 498217 423869 119 1762 5 0% 0 0 0 49.059455
liquid-compile (click) 426853 373948 151 2049 2 0% 0 0 0 62.807082
liquid-render (click) 602853 532504 143 2268 8 0% 0 0 0 63.454654
lobsters (click) 7545883 6393547 3225 50054 72 0% 0 0 0 1690.247048
mail (click) 702577 627471 345 4833 14 0% 0 0 0 142.055848
psych-load (click) 284223 255822 65 649 3 0% 0 0 0 20.370076
railsbench (click) 2910164 2499992 1642 15561 54 0% 0 0 0 449.267629
rubocop (click) 4944377 4266619 2901 44342 99 0% 4 0 0 1340.214586
ruby-lsp (click) 618692 525133 159 2792 14 0% 0 0 0 78.814104
sequel (click) 478988 408680 16 117 0 0% 0 0 0 4.281892
binarytrees (click) 9143 8108 11 75 0 0% 0 0 0 2.995407
blurhash (click) 51449 50179 32 478 0 0% 0 0 0 15.822499
erubi (click) 257320 240469 10 114 0 0% 0 0 0 3.858785
etanni (click) 31551 30158 12 98 0 0% 0 0 0 3.337057
fannkuchredux (click) 24892 26732 9 259 0 0% 0 0 0 8.04678
fluentd (click) 371258 312290 11 111 0 0% 0 0 0 3.673014
graphql (click) 422294 358333 70 668 0 0% 0 0 0 20.616182
graphql-native (click) 389168 344265 42 273 0 0% 0 0 0 9.295178
lee (click) 300568 257487 49 734 0 0% 0 0 0 23.160511
matmul (click) 12467 4614 12 126 0 0% 0 0 0 4.223892
nbody (click) 15120 16376 11 187 0 0% 0 0 0 5.124276
nqueens (click) 23567 27084 10 263 0 0% 0 0 0 7.898945
optcarrot (click) 312040 304710 194 4321 34 0% 0 0 0 103.413792
rack (click) 257571 237030 31 322 0 0% 0 0 0 9.233855
ruby-json (click) 27898 25598 12 202 0 0% 0 0 0 6.166624
rubykon (click) 131010 79614 145 1502 3 0% 0 0 0 42.33674
sudoku (click) 46746 38099 11 507 0 0% 0 0 0 15.400885
tinygql (click) 295757 251328 63 792 5 0% 0 0 0 23.096166
30k_ifelse (click) 4909290 4374633 9264 50815 0 0% 0 0 0 1418.112226
30k_methods (click) 1850186 1594311 5782 19371 0 0% 0 0 0 501.193799
cfunc_itself (click) 7580 6763 9 72 0 0% 0 0 0 2.372621
fib (click) 4896 5000 8 49 0 0% 0 0 0 1.838034
getivar (click) 6031 6390 8 74 0 0% 0 0 0 2.268809
keyword_args (click) 8193 6972 10 74 0 0% 0 0 0 2.588969
respond_to (click) 8323 191 9 87 0 0% 0 0 0 2.800569
ruby-xor (click) 7503 7326 9 81 0 0% 0 0 0 2.628337
setivar (click) 5182 4971 8 54 0 0% 0 0 0 1.856277
setivar_object (click) 5520 4991 8 54 0 0% 0 0 0 1.912483
setivar_young (click) 6287 5780 9 62 0 0% 0 0 0 2.139026
str_concat (click) 7845 7725 11 87 0 0% 0 0 0 2.885209
throw (click) 7575 6432 10 69 0 0% 0 0 0 2.374557

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.