YJIT Benchmarks

Details for Benchmarks at 2024-01-26 06:08:16 UTC

YJIT metrics from the yjit-bench suite using Ruby 771a2f039b

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 67.0% faster than CRuby 3.4.0dev
On railsbench it is
  • 68.6% 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) 856563 742474 49 534 0 0% 0 0 0 16.009096
chunky-png (click) 320053 271723 87 1106 1 0% 0 0 0 32.570695
erubi-rails (click) 1672421 1446719 281 2910 6 0% 0 0 0 82.284059
hexapdf (click) 1359553 1140280 597 12286 36 0% 0 0 0 361.168616
liquid-c (click) 505603 445498 119 1761 5 0% 0 0 0 48.585438
liquid-compile (click) 427319 334281 151 2047 2 0% 0 0 0 62.722947
liquid-render (click) 602715 459925 143 2267 8 0% 0 0 0 62.52324
lobsters (click) 7558755 6420833 3226 49904 73 0% 0 0 0 1676.185579
mail (click) 700796 635614 345 4827 12 0% 0 0 0 140.613859
psych-load (click) 282405 255611 65 649 3 0% 0 0 0 20.130588
railsbench (click) 2917196 2569309 1642 15540 54 0% 0 0 0 448.603211
rubocop (click) 4954352 4320895 2901 44289 99 0% 4 0 0 1331.134424
ruby-lsp (click) 618311 541967 159 2762 14 0% 0 0 0 77.383508
sequel (click) 477140 440010 16 118 0 0% 0 0 0 4.529465
binarytrees (click) 9291 8120 11 75 0 0% 0 0 0 2.967198
blurhash (click) 55111 50797 32 478 0 0% 0 0 0 15.938714
erubi (click) 255839 232242 10 114 0 0% 0 0 0 3.871638
etanni (click) 31947 30258 12 98 0 0% 0 0 0 3.359677
fannkuchredux (click) 24971 26731 9 259 0 0% 0 0 0 7.875596
fluentd (click) 373064 337040 11 111 0 0% 0 0 0 3.626691
graphql (click) 426549 384675 70 668 0 0% 0 0 0 20.789253
graphql-native (click) 393148 345797 42 273 0 0% 0 0 0 9.135558
lee (click) 300415 233294 49 734 0 0% 0 0 0 23.33849
matmul (click) 12823 4423 12 123 0 0% 0 0 0 4.280555
nbody (click) 18045 16846 11 187 0 0% 0 0 0 5.522088
nqueens (click) 21345 24174 10 229 0 0% 0 0 0 7.110783
optcarrot (click) 313426 304977 194 4318 34 0% 0 0 0 102.836613
rack (click) 255847 228764 31 322 0 0% 0 0 0 9.279954
ruby-json (click) 28225 25685 12 202 0 0% 0 0 0 6.185271
rubykon (click) 133517 97914 145 1518 3 0% 0 0 0 42.49132
sudoku (click) 46825 38098 11 507 0 0% 0 0 0 15.127467
tinygql (click) 294446 268074 63 792 5 0% 0 0 0 22.697269
30k_ifelse (click) 4909438 4374645 9264 50815 0 0% 0 0 0 1402.000651
30k_methods (click) 1850265 1594310 5782 19371 0 0% 0 0 0 496.089955
cfunc_itself (click) 7728 6775 9 72 0 0% 0 0 0 2.434845
fib (click) 5044 5012 8 49 0 0% 0 0 0 1.988817
getivar (click) 6179 6402 8 74 0 0% 0 0 0 2.227462
keyword_args (click) 8341 6984 10 74 0 0% 0 0 0 2.683
respond_to (click) 8471 8395 9 87 0 0% 0 0 0 2.829257
ruby-xor (click) 7146 6797 8 76 0 0% 0 0 0 2.380948
setivar (click) 5330 4983 8 54 0 0% 0 0 0 1.960919
setivar_object (click) 5668 5003 8 54 0 0% 0 0 0 1.997101
setivar_young (click) 6435 5792 9 62 0 0% 0 0 0 2.251234
str_concat (click) 7993 7737 11 87 0 0% 0 0 0 2.894786
throw (click) 7723 6444 10 69 0 0% 0 0 0 2.374882

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.