YJIT Benchmarks

Details for Benchmarks at 2024-02-01 19:08:18 UTC

YJIT metrics from the yjit-bench suite using Ruby ae0441358b

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 67.2% faster than CRuby 3.4.0dev
On railsbench it is
  • 64.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 494 30 494
chunky-png 30 31 30 31
erubi-rails 30 20 30 20
hexapdf 30 15 30 15
liquid-c 30 352 30 352
liquid-compile 30 335 30 335
liquid-render 30 252 30 252
lobsters 30 22 30 22
mail 30 163 30 163
psych-load 30 15 30 15
railsbench 30 15 30 15
rubocop 30 180 30 180
ruby-lsp 30 178 30 178
sequel 30 290 30 290
binarytrees 30 84 30 84
blurhash 30 94 30 94
erubi 30 73 30 73
etanni 30 51 30 51
fannkuchredux 30 24 30 24
fluentd 30 15 30 15
graphql 30 15 30 15
graphql-native 30 34 30 34
lee 30 20 30 20
matmul 30 16 30 16
nbody 30 283 30 283
nqueens 30 275 30 275
optcarrot 30 15 30 15
rack 30 183 30 183
ruby-json 30 15 30 15
rubykon 30 15 30 15
sudoku 30 26 30 26
tinygql 30 40 30 40
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 943 30 943
keyword_args 30 533 30 533
respond_to 30 1437 30 1437
ruby-xor 15 15 15 15
setivar 30 1668 30 1668
setivar_object 30 348 30 348
setivar_young 30 379 30 379
str_concat 30 388 30 388
throw 30 849 30 849

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) 852689 773423 49 534 0 0% 0 0 0 16.289903
chunky-png (click) 320760 287065 87 1104 1 0% 0 0 0 32.508788
erubi-rails (click) 1668205 1459780 280 2932 6 0% 0 0 0 82.09824
hexapdf (click) 1364227 1144459 596 12432 37 0% 0 0 0 366.166721
liquid-c (click) 497176 414492 119 1762 5 0% 0 0 0 48.542624
liquid-compile (click) 426255 381331 151 2048 2 0% 0 0 0 62.655862
liquid-render (click) 602046 482382 143 2268 8 0% 0 0 0 62.92235
lobsters (click) 7522488 6506878 3226 49926 72 0% 0 0 0 1671.469742
mail (click) 701770 618337 345 4833 14 0% 0 0 0 141.091536
psych-load (click) 283417 263104 65 649 3 0% 0 0 0 20.188994
railsbench (click) 2904881 2634637 1642 15548 54 0% 0 0 0 446.47496
rubocop (click) 4952167 4200134 2901 44385 100 0% 4 0 0 1334.915569
ruby-lsp (click) 617890 507775 159 2759 14 0% 0 0 0 77.564765
sequel (click) 482076 427099 16 117 0 0% 0 0 0 4.589672
binarytrees (click) 9143 8108 11 75 0 0% 0 0 0 2.936151
blurhash (click) 51449 50179 32 478 0 0% 0 0 0 15.663853
erubi (click) 256513 223150 10 114 0 0% 0 0 0 3.83323
etanni (click) 31551 30158 12 98 0 0% 0 0 0 3.35334
fannkuchredux (click) 24892 26732 9 259 0 0% 0 0 0 7.978726
fluentd (click) 370456 327601 11 111 0 0% 0 0 0 3.641378
graphql (click) 421485 340990 70 668 0 0% 0 0 0 20.617043
graphql-native (click) 388361 343335 42 273 0 0% 0 0 0 9.152266
lee (click) 299759 281153 49 734 0 0% 0 0 0 23.766557
matmul (click) 12467 4614 12 126 0 0% 0 0 0 4.236719
nbody (click) 15120 16376 11 187 0 0% 0 0 0 5.126577
nqueens (click) 23567 27084 10 263 0 0% 0 0 0 7.915854
optcarrot (click) 312040 304710 194 4321 34 0% 0 0 0 102.728529
rack (click) 256769 211588 31 322 0 0% 0 0 0 9.133331
ruby-json (click) 27898 25598 12 202 0 0% 0 0 0 6.183579
rubykon (click) 131364 112626 145 1504 3 0% 0 0 0 42.007649
sudoku (click) 46746 38099 11 507 0 0% 0 0 0 15.149633
tinygql (click) 294955 234034 63 792 5 0% 0 0 0 22.828487
30k_ifelse (click) 4909290 4374633 9264 50815 0 0% 0 0 0 1408.317985
30k_methods (click) 1850186 1594311 5782 19371 0 0% 0 0 0 497.435303
cfunc_itself (click) 7580 6763 9 72 0 0% 0 0 0 2.380249
fib (click) 4896 5000 8 49 0 0% 0 0 0 1.880157
getivar (click) 6031 6390 8 74 0 0% 0 0 0 2.399988
keyword_args (click) 8193 6972 10 74 0 0% 0 0 0 2.62572
respond_to (click) 8323 191 9 87 0 0% 0 0 0 2.858788
ruby-xor (click) 6955 6838 8 76 0 0% 0 0 0 2.353149
setivar (click) 5182 4971 8 54 0 0% 0 0 0 1.946351
setivar_object (click) 5520 4991 8 54 0 0% 0 0 0 1.988318
setivar_young (click) 6287 5780 9 62 0 0% 0 0 0 2.249573
str_concat (click) 7845 7725 11 87 0 0% 0 0 0 2.895211
throw (click) 7575 6432 10 69 0 0% 0 0 0 2.344691

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.