YJIT Benchmarks

Details for Benchmarks at 2024-09-07 04:00:21 UTC

YJIT metrics from the yjit-bench suite using Ruby c1a510a8df

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 73.1% faster than CRuby 3.4.0dev
  • 1.2% faster than YJIT 3.3.4
On railsbench it is
  • 80.3% faster than CRuby 3.4.0dev
  • 1.2% faster than 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 57 10 57 10 151 10 144
chunky-png 10 18 10 18 10 35 10 40
erubi-rails 10 10 10 10 10 22 10 21
hexapdf 10 10 10 10 10 10 10 10
liquid-c 10 349 10 348 10 497 10 507
liquid-compile 10 344 10 339 10 501 10 496
liquid-render 10 139 10 135 10 356 10 373
lobsters 10 13 10 13 10 24 10 23
mail 10 158 10 157 10 231 10 228
psych-load 10 10 10 10 10 10 10 10
railsbench 10 10 10 10 10 10 10 10
rubocop 10 135 10 131 10 234 10 236
ruby-lsp 10 127 10 116 10 212 10 185
sequel 10 326 10 322 10 428 10 439
binarytrees 10 51 10 49 10 118 10 104
blurhash 10 62 10 61 10 120 10 149
erubi 10 84 10 93 10 105 10 123
etanni 10 60 10 63 10 69 10 75
fannkuchredux 10 10 10 10 10 17 10 20
fluentd 10 10 10 10 10 10 10 10
graphql 10 10 10 10 10 10 10 10
graphql-native 10 29 10 29 10 32 10 32
lee 10 11 10 12 10 20 10 21
matmul 10 10 10 10 10 15 10 19
nbody 10 203 10 209 10 421 10 516
nqueens 10 112 10 114 10 113 10 439
optcarrot 10 10 10 10 10 10 10 10
protoboeuf 10 156 10 151 10 582 10 687
protoboeuf-encode 10 132 10 162 10 293 10 651
rack 10 455 10 469 10 824 10 950
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 22 10 51 10 52
30k_ifelse 10 10 10 10 10 70 10 63
30k_methods 10 10 10 10 10 26 10 26
cfunc_itself 10 250 10 268 10 1108 10 1212
fib 10 102 10 100 10 616 10 623
getivar 10 214 10 221 10 1252 10 1727
keyword_args 10 90 10 93 10 729 10 947
object-new 10 225 10 195 10 308 10 241
respond_to 10 91 10 95 10 1785 10 2219
ruby-xor 10 30 10 30 10 92 10 168
setivar 10 348 10 407 10 2319 10 3118
setivar_object 10 216 10 241 10 536 10 513
setivar_young 10 216 10 242 10 528 10 512
str_concat 10 319 10 333 10 659 10 670
throw 10 967 10 830 10 1345 10 1056

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) 1447826 1238230 214 2301 0 0% 0 0 80.833627
chunky-png (click) 295328 235609 82 1095 1 0% 0 0 37.572613
erubi-rails (click) 1918020 1608088 245 2823 8 0% 0 0 90.842824
hexapdf (click) 1364303 1187017 507 12606 40 0% 0 0 437.013667
liquid-c (click) 489660 389153 118 1858 5 0% 0 0 60.699553
liquid-compile (click) 417943 371302 150 2203 2 0% 0 0 79.799023
liquid-render (click) 601344 498547 135 2472 12 0% 0 0 81.057215
lobsters (click) 8052290 6736110 3086 51802 182 0% 0 0 2070.174622
mail (click) 737848 641706 346 5481 16 0% 0 0 187.538628
psych-load (click) 248969 210580 60 615 3 0% 0 0 22.426818
railsbench (click) 3314926 2885175 1631 16724 41 0% 0 0 563.338764
rubocop (click) 5814455 5091346 2892 52177 110 0% 4 0 1865.614088
ruby-lsp (click) 860600 711967 308 4986 26 0% 0 0 170.891564
sequel (click) 461058 404123 15 122 0 0% 0 0 5.185397
binarytrees (click) 9721 8668 8 76 0 0% 0 0 3.655872
blurhash (click) 57136 49713 29 501 0 0% 0 0 19.87684
erubi (click) 253266 212324 9 108 0 0% 0 0 4.165561
etanni (click) 24711 23355 10 87 0 0% 0 0 3.339743
fannkuchredux (click) 22545 29447 3 240 0 0% 0 0 9.225973
fluentd (click) 338024 291616 3 22 0 0% 0 0 1.018965
graphql (click) 390714 333586 65 649 0 0% 0 0 22.600609
graphql-native (click) 358143 315088 41 275 0 0% 0 0 10.193389
lee (click) 258100 225639 33 567 0 0% 0 0 20.780969
matmul (click) 7323 8338 6 76 0 0% 0 0 2.969269
nbody (click) 15399 19810 9 201 0 0% 0 0 6.438724
nqueens (click) 21699 28649 8 252 0 0% 0 0 9.35843
optcarrot (click) 324183 308580 186 4508 34 0% 0 0 122.46158
protoboeuf (click) 163936 155521 15 1615 0 0% 0 0 57.01299
protoboeuf-encode (click) 235128 231105 17 1254 0 0% 0 0 38.521881
rack (click) 235321 209077 36 417 0 0% 0 0 13.10019
ruby-json (click) 24342 21342 6 160 0 0% 0 0 5.21687
rubykon (click) 140687 120490 135 1573 3 0% 0 0 52.367165
sudoku (click) 44903 40454 6 507 0 0% 0 0 18.886559
tinygql (click) 270575 223418 57 743 5 0% 0 0 24.936781
30k_ifelse (click) 6312890 5789092 9257 56443 0 0% 0 0 1913.76165
30k_methods (click) 2232791 1591091 5776 19329 0 0% 0 0 546.828516
cfunc_itself (click) 6912 5554 7 62 0 0% 0 0 2.223181
fib (click) 4585 4605 6 42 0 0% 0 0 1.83517
getivar (click) 5037 6014 6 64 0 0% 0 0 2.125309
keyword_args (click) 8181 6507 8 65 0 0% 0 0 2.668024
object-new (click) 3469 3394 5 35 0 0% 0 0 1.892958
respond_to (click) 9866 2524 7 100 0 0% 0 0 3.602659
ruby-xor (click) 4619 5278 3 52 0 0% 0 0 1.760077
setivar (click) 4188 4690 6 44 0 0% 0 0 1.647337
setivar_object (click) 4717 4838 6 46 0 0% 0 0 1.833748
setivar_young (click) 5427 5560 7 54 0 0% 0 0 2.111694
str_concat (click) 7646 7893 9 81 0 0% 0 0 3.186341
throw (click) 7384 5592 8 59 0 0% 0 0 2.412372

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.