YJIT Benchmarks

Details for Benchmarks at 2024-02-14 06:08:17 UTC

YJIT metrics from the yjit-bench suite using Ruby eea7ce55de

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 71.6% faster than CRuby 3.4.0dev
On railsbench it is
  • 68.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 493 30 493
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 340 30 340
liquid-render 30 250 30 250
lobsters 30 23 30 23
mail 30 161 30 161
psych-load 30 15 30 15
railsbench 30 15 30 15
rubocop 30 183 30 183
ruby-lsp 30 211 30 211
sequel 30 287 30 287
binarytrees 30 85 30 85
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 22 30 22
lee 30 20 30 20
matmul 30 18 30 18
nbody 30 335 30 335
nqueens 30 304 30 304
optcarrot 30 15 30 15
rack 30 180 30 180
ruby-json 30 15 30 15
rubykon 30 15 30 15
sudoku 30 26 30 26
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 943 30 943
keyword_args 30 532 30 532
respond_to 30 1458 30 1458
ruby-xor 30 85 30 85
setivar 30 1668 30 1668
setivar_object 30 358 30 358
setivar_young 30 364 30 364
str_concat 30 418 30 418
throw 30 830 30 830

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) 885997 786026 49 524 0 0% 0 0 0 15.309407
chunky-png (click) 326089 287843 87 1104 1 0% 0 0 0 32.543023
erubi-rails (click) 1714294 1462888 280 2938 6 0% 0 0 0 81.3543
hexapdf (click) 1417194 1189890 597 12596 37 0% 0 0 0 368.230286
liquid-c (click) 521005 456125 120 1758 5 0% 0 0 0 48.323849
liquid-compile (click) 443190 388707 151 2048 2 0% 0 0 0 62.008346
liquid-render (click) 621889 565546 144 2271 8 0% 0 0 0 63.065347
lobsters (click) 7933442 6609985 3220 50474 72 0% 0 0 0 1721.766624
mail (click) 720759 623026 346 4849 14 0% 0 0 0 142.222492
psych-load (click) 287287 247703 65 650 3 0% 0 0 0 19.848934
railsbench (click) 2998972 2560606 1643 15617 54 0% 0 0 0 450.261044
rubocop (click) 5363002 4620989 2902 47682 105 0% 4 0 0 1425.627448
ruby-lsp (click) 626611 532751 159 2816 14 0% 0 0 0 77.915726
sequel (click) 496000 414326 16 118 0 0% 0 0 0 4.296179
binarytrees (click) 9392 7588 11 75 0 0% 0 0 0 2.951811
blurhash (click) 52697 47824 32 476 0 0% 0 0 0 15.658439
erubi (click) 259087 217427 10 114 0 0% 0 0 0 3.832514
etanni (click) 31783 27950 12 98 0 0% 0 0 0 3.256667
fannkuchredux (click) 24986 25976 9 259 0 0% 0 0 0 7.924311
fluentd (click) 385937 335271 11 111 0 0% 0 0 0 3.653037
graphql (click) 430134 367567 70 670 0 0% 0 0 0 20.4714
graphql-native (click) 395681 337181 41 268 0 0% 0 0 0 8.642461
lee (click) 313620 262149 49 737 0 0% 0 0 0 22.979971
matmul (click) 12586 12175 12 126 0 0% 0 0 0 4.273147
nbody (click) 15213 7657 11 187 0 0% 0 0 0 4.935243
nqueens (click) 23683 17949 10 263 0 0% 0 0 0 7.76191
optcarrot (click) 320147 245517 192 4345 34 0% 0 0 0 104.40225
rack (click) 259958 221240 31 322 0 0% 0 0 0 9.089244
ruby-json (click) 28208 23153 12 200 0 0% 0 0 0 5.855193
rubykon (click) 133942 122908 143 1500 3 0% 0 0 0 41.741989
sudoku (click) 47007 45195 11 507 0 0% 0 0 0 15.36188
tinygql (click) 301039 244904 63 792 5 0% 0 0 0 23.167042
30k_ifelse (click) 5222688 4374316 9264 50815 0 0% 0 0 0 1448.340472
30k_methods (click) 2019699 1594292 5782 19371 0 0% 0 0 0 521.360449
cfunc_itself (click) 7663 5893 9 72 0 0% 0 0 0 2.290941
fib (click) 5017 4633 8 49 0 0% 0 0 0 1.802453
getivar (click) 6102 6023 8 74 0 0% 0 0 0 2.25311
keyword_args (click) 8526 6585 10 74 0 0% 0 0 0 2.522457
respond_to (click) 8415 7843 9 87 0 0% 0 0 0 2.702083
ruby-xor (click) 7544 6739 9 81 0 0% 0 0 0 2.572428
setivar (click) 5253 4604 8 54 0 0% 0 0 0 1.858777
setivar_object (click) 5591 4624 8 54 0 0% 0 0 0 1.808969
setivar_young (click) 6343 5271 9 62 0 0% 0 0 0 2.021818
str_concat (click) 8006 7287 11 87 0 0% 0 0 0 2.938609
throw (click) 7946 6065 10 69 0 0% 0 0 0 2.412046

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.