YJIT Benchmarks

Details for Benchmarks at 2024-09-16 15:03:02 UTC

YJIT metrics from the yjit-bench suite using Ruby 50564f8882

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 75.6% faster than CRuby 3.4.0dev
  • 3.5% faster than YJIT 3.3.4
On railsbench it is
  • 73.9% faster than CRuby 3.4.0dev
  • the same speed as YJIT 3.3.4

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.3.4 warmups CRuby 3.3.4 iters CRuby 3.4.0dev warmups CRuby 3.4.0dev iters YJIT 3.3.4 warmups YJIT 3.3.4 iters YJIT 3.4.0dev warmups YJIT 3.4.0dev iters
activerecord 10 56 10 59 10 145 10 151
chunky-png 10 18 10 17 10 35 10 40
erubi-rails 10 10 10 10 10 22 10 22
hexapdf 10 10 10 10 10 10 10 10
liquid-c 10 347 10 352 10 500 10 520
liquid-compile 10 344 10 346 10 497 10 593
liquid-render 10 137 10 135 10 357 10 371
lobsters 10 13 10 13 10 24 10 23
mail 10 161 10 163 10 232 10 199
psych-load 10 10 10 10 10 10 10 10
railsbench 10 10 10 10 10 10 10 10
ruby-lsp 10 130 10 130 10 217 10 220
binarytrees 10 51 10 52 10 118 10 120
blurhash 10 62 10 62 10 120 10 141
erubi 10 79 10 59 10 106 10 129
etanni 10 59 10 66 10 69 10 82
fannkuchredux 10 10 10 10 10 17 10 21
fluentd 10 10 10 10 10 10 10 10
graphql 10 10 10 10 10 10 10 10
graphql-native 10 28 10 41 10 33 10 47
lee 10 11 10 12 10 20 10 21
matmul 10 10 10 10 10 15 10 18
nbody 10 203 10 197 10 421 10 519
nqueens 10 114 10 117 10 114 10 444
optcarrot 10 10 10 10 10 10 10 10
protoboeuf 10 157 10 155 10 582 10 648
protoboeuf-encode 10 132 10 166 10 293 10 649
rack 10 464 10 494 10 836 10 898
ruby-json 10 10 10 10 10 10 10 10
rubykon 10 10 10 10 10 10 10 10
sudoku 10 10 10 10 10 28 10 33
tinygql 10 23 10 24 10 51 10 52
30k_ifelse 10 10 10 10 10 71 10 62
30k_methods 10 10 10 10 10 26 10 25
cfunc_itself 10 247 10 265 10 1108 10 1212
fib 10 102 10 96 10 616 10 623
getivar 10 215 10 209 10 1253 10 1715
keyword_args 10 90 10 88 10 730 10 947
object-new 10 229 10 193 10 309 10 239
respond_to 10 90 10 91 10 1785 10 2216
ruby-xor 10 30 10 31 10 92 10 166
setivar 10 348 10 365 10 2319 10 3092
setivar_object 10 216 10 226 10 536 10 567
setivar_young 10 216 10 229 10 528 10 568
str_concat 10 319 10 346 10 658 10 679
throw 10 983 10 835 10 1347 10 1067

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) 1453560 1223203 214 2301 0 0% 0 0 80.304931
chunky-png (click) 285358 268876 82 1090 1 0% 0 0 37.343717
erubi-rails (click) 1918077 1620540 245 2808 8 0% 0 0 90.150983
hexapdf (click) 1390539 1209060 507 12572 40 0% 0 0 430.855889
liquid-c (click) 490837 373194 119 1859 5 0% 0 0 60.194913
liquid-compile (click) 444501 334468 150 2193 2 0% 0 0 77.968132
liquid-render (click) 621145 466797 136 2473 12 0% 0 0 81.242802
lobsters (click) 8058037 6860427 3086 51757 183 0% 0 0 2050.3133
mail (click) 779617 667405 346 5489 16 0% 0 0 187.531475
psych-load (click) 267179 218335 60 613 3 0% 0 0 22.240374
railsbench (click) 3319202 2828814 1631 16662 41 0% 0 0 560.322238
ruby-lsp (click) 884456 803996 308 4992 26 0% 0 0 168.904534
binarytrees (click) 9721 8668 8 76 0 0% 0 0 3.508073
blurhash (click) 57136 49713 29 501 0 0% 0 0 19.700392
erubi (click) 240517 218818 9 108 0 0% 0 0 4.273526
etanni (click) 28241 26371 10 86 0 0% 0 0 3.283615
fannkuchredux (click) 22572 29447 3 240 0 0% 0 0 9.134993
fluentd (click) 337411 294138 3 22 0 0% 0 0 1.01655
graphql (click) 398100 356602 65 651 0 0% 0 0 22.581576
graphql-native (click) 395753 337513 41 275 0 0% 0 0 10.361576
lee (click) 257693 232213 33 567 0 0% 0 0 20.602071
matmul (click) 7323 8338 6 76 0 0% 0 0 2.972646
nbody (click) 15428 19810 9 201 0 0% 0 0 6.274702
nqueens (click) 21699 28649 8 252 0 0% 0 0 9.53961
optcarrot (click) 324183 308580 186 4508 34 0% 0 0 120.846817
protoboeuf (click) 163936 155521 15 1615 0 0% 0 0 56.747041
protoboeuf-encode (click) 235128 231105 17 1254 0 0% 0 0 38.58135
rack (click) 268690 237289 36 420 0 0% 0 0 13.118447
ruby-json (click) 24330 21342 6 159 0 0% 0 0 5.236768
rubykon (click) 140687 120490 135 1573 3 0% 0 0 52.623663
sudoku (click) 44903 40454 6 507 0 0% 0 0 18.49247
tinygql (click) 283176 240942 57 743 5 0% 0 0 24.565934
30k_ifelse (click) 6312890 5789092 9257 56443 0 0% 0 0 1913.102891
30k_methods (click) 2232791 1591091 5776 19329 0 0% 0 0 542.70683
cfunc_itself (click) 6912 5554 7 62 0 0% 0 0 2.265845
fib (click) 4585 4605 6 42 0 0% 0 0 1.824839
getivar (click) 5037 6014 6 64 0 0% 0 0 2.103541
keyword_args (click) 8181 6507 8 65 0 0% 0 0 2.617436
object-new (click) 3469 3394 5 35 0 0% 0 0 1.655161
respond_to (click) 9866 2524 7 100 0 0% 0 0 3.498042
ruby-xor (click) 4619 5278 3 52 0 0% 0 0 1.796397
setivar (click) 4188 4690 6 44 0 0% 0 0 1.69546
setivar_object (click) 4717 4838 6 46 0 0% 0 0 1.836566
setivar_young (click) 5427 5560 7 54 0 0% 0 0 2.119168
str_concat (click) 7646 7893 9 81 0 0% 0 0 3.234612
throw (click) 7384 5592 8 59 0 0% 0 0 2.391569

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.