YJIT Benchmarks

Details for Benchmarks at 2024-02-06 19:08:12 UTC

YJIT metrics from the yjit-bench suite using Ruby f5b368df0c

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 67.8% faster than CRuby 3.4.0dev
On railsbench it is
  • 66.3% 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 31 30 31
erubi-rails 30 19 30 19
hexapdf 30 15 30 15
liquid-c 30 348 30 348
liquid-compile 30 341 30 341
liquid-render 30 248 30 248
lobsters 30 22 30 22
mail 30 163 30 163
psych-load 30 15 30 15
railsbench 30 15 30 15
rubocop 30 178 30 178
ruby-lsp 30 213 30 213
sequel 30 288 30 288
binarytrees 30 84 30 84
blurhash 30 102 30 102
erubi 30 76 30 76
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 20 30 20
matmul 30 19 30 19
nbody 30 336 30 336
nqueens 30 301 30 301
optcarrot 30 15 30 15
rack 30 178 30 178
ruby-json 30 15 30 15
rubykon 30 15 30 15
sudoku 30 27 30 27
tinygql 30 42 30 42
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 938 30 938
keyword_args 30 533 30 533
respond_to 30 1437 30 1437
ruby-xor 30 93 30 93
setivar 30 1669 30 1669
setivar_object 30 307 30 307
setivar_young 30 370 30 370
str_concat 30 398 30 398
throw 30 825 30 825

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) 853536 774486 49 534 0 0% 0 0 0 15.92804
chunky-png (click) 321612 279837 87 1104 1 0% 0 0 0 32.705494
erubi-rails (click) 1670599 1445234 280 2953 6 0% 0 0 0 84.068887
hexapdf (click) 1364449 1153092 597 12426 37 0% 0 0 0 367.795825
liquid-c (click) 498257 423898 119 1762 5 0% 0 0 0 48.789144
liquid-compile (click) 427102 365906 151 2048 2 0% 0 0 0 62.612009
liquid-render (click) 602893 532533 143 2268 8 0% 0 0 0 63.046794
lobsters (click) 7544893 6512836 3223 50025 74 0% 0 0 0 1689.706411
mail (click) 702617 627500 345 4833 14 0% 0 0 0 142.173319
psych-load (click) 284263 255851 65 649 3 0% 0 0 0 20.380353
railsbench (click) 2910865 2500267 1642 15566 54 0% 0 0 0 448.570359
rubocop (click) 4957087 4229049 2901 44405 100 0% 4 0 0 1345.609315
ruby-lsp (click) 618732 525130 159 2792 14 0% 0 0 0 78.562413
sequel (click) 478733 416468 16 117 0 0% 0 0 0 4.177926
binarytrees (click) 9143 8108 11 75 0 0% 0 0 0 2.980218
blurhash (click) 51449 50179 32 478 0 0% 0 0 0 15.739721
erubi (click) 257365 240498 10 114 0 0% 0 0 0 3.870002
etanni (click) 31551 30158 12 98 0 0% 0 0 0 3.356579
fannkuchredux (click) 24892 26732 9 259 0 0% 0 0 0 8.031502
fluentd (click) 371308 328581 11 111 0 0% 0 0 0 3.651985
graphql (click) 422334 358403 70 668 0 0% 0 0 0 20.622626
graphql-native (click) 389208 344364 42 273 0 0% 0 0 0 9.210419
lee (click) 300606 257516 49 734 0 0% 0 0 0 23.350281
matmul (click) 12467 4614 12 126 0 0% 0 0 0 4.23181
nbody (click) 15120 16376 11 187 0 0% 0 0 0 5.07524
nqueens (click) 23567 27084 10 263 0 0% 0 0 0 7.853351
optcarrot (click) 312040 304710 194 4321 34 0% 0 0 0 103.284429
rack (click) 257616 220707 31 322 0 0% 0 0 0 9.332498
ruby-json (click) 27898 25598 12 202 0 0% 0 0 0 6.130686
rubykon (click) 131010 79614 145 1502 3 0% 0 0 0 42.248396
sudoku (click) 46746 38099 11 507 0 0% 0 0 0 15.387496
tinygql (click) 295802 251357 63 792 5 0% 0 0 0 22.860143
30k_ifelse (click) 4909290 4374633 9264 50815 0 0% 0 0 0 1416.066163
30k_methods (click) 1850186 1594311 5782 19371 0 0% 0 0 0 499.97177
cfunc_itself (click) 7580 6763 9 72 0 0% 0 0 0 2.346087
fib (click) 4896 5000 8 49 0 0% 0 0 0 1.816672
getivar (click) 6031 6390 8 74 0 0% 0 0 0 2.238073
keyword_args (click) 8193 6972 10 74 0 0% 0 0 0 2.548846
respond_to (click) 8323 191 9 87 0 0% 0 0 0 2.76194
ruby-xor (click) 7503 7326 9 81 0 0% 0 0 0 2.630713
setivar (click) 5182 4971 8 54 0 0% 0 0 0 1.843988
setivar_object (click) 5520 4991 8 54 0 0% 0 0 0 1.920365
setivar_young (click) 6287 5780 9 62 0 0% 0 0 0 2.094989
str_concat (click) 7845 7725 11 87 0 0% 0 0 0 2.917458
throw (click) 7575 6432 10 69 0 0% 0 0 0 2.37518

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.