YJIT Benchmarks

Details for Benchmarks at 2024-09-10 02:50:49 UTC

YJIT metrics from the yjit-bench suite using Ruby 3db2782748

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 73.1% faster than CRuby 3.4.0dev
  • 2.8% faster than YJIT 3.3.4
On railsbench it is
  • 79.3% 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 57 10 143 10 143
chunky-png 10 18 10 17 10 36 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 350 10 486 10 514
liquid-compile 10 346 10 341 10 500 10 500
liquid-render 10 137 10 131 10 353 10 364
lobsters 10 13 10 13 10 24 10 23
mail 10 161 10 161 10 238 10 232
psych-load 10 10 10 10 10 10 10 10
railsbench 10 10 10 10 10 10 10 10
ruby-lsp 10 128 10 131 10 213 10 217
sequel 10 324 10 321 10 427 10 439
binarytrees 10 51 10 50 10 118 10 113
blurhash 10 62 10 63 10 120 10 143
erubi 10 84 10 101 10 104 10 130
etanni 10 59 10 68 10 69 10 80
fannkuchredux 10 10 10 10 10 17 10 18
fluentd 10 10 10 10 10 10 10 10
graphql 10 10 10 10 10 10 10 10
graphql-native 10 30 10 40 10 32 10 47
lee 10 11 10 12 10 20 10 21
matmul 10 10 10 10 10 15 10 18
nbody 10 203 10 211 10 421 10 546
nqueens 10 113 10 114 10 113 10 453
optcarrot 10 10 10 10 10 10 10 10
protoboeuf 10 159 10 156 10 537 10 677
protoboeuf-encode 10 132 10 165 10 294 10 643
rack 10 451 10 470 10 833 10 902
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 24 10 22 10 51 10 51
30k_ifelse 10 10 10 10 10 70 10 63
30k_methods 10 10 10 10 10 26 10 25
cfunc_itself 10 249 10 253 10 1107 10 1211
fib 10 100 10 100 10 616 10 623
getivar 10 214 10 224 10 1254 10 1732
keyword_args 10 90 10 89 10 729 10 948
object-new 10 230 10 185 10 309 10 228
respond_to 10 91 10 91 10 1785 10 2216
ruby-xor 10 30 10 31 10 92 10 183
setivar 10 348 10 411 10 2320 10 3122
setivar_object 10 216 10 254 10 536 10 626
setivar_young 10 215 10 251 10 528 10 624
str_concat 10 319 10 328 10 658 10 689
throw 10 968 10 792 10 1337 10 994

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) 1455554 1243848 214 2301 0 0% 0 0 80.420348
chunky-png (click) 296700 286399 82 1090 1 0% 0 0 37.900506
erubi-rails (click) 1925671 1660908 246 2847 8 0% 0 0 91.745378
hexapdf (click) 1370829 1175447 507 12607 40 0% 0 0 436.650283
liquid-c (click) 498346 429359 118 1858 5 0% 0 0 60.124902
liquid-compile (click) 445130 368007 150 2204 2 0% 0 0 79.590504
liquid-render (click) 614345 519629 135 2476 12 0% 0 0 80.597776
lobsters (click) 8054655 6720248 3086 51788 182 0% 0 0 2062.261494
mail (click) 772777 678529 346 5481 16 0% 0 0 186.360554
psych-load (click) 254658 231139 60 613 3 0% 0 0 22.70089
railsbench (click) 3306535 2868528 1631 16703 41 0% 0 0 556.12038
ruby-lsp (click) 851803 709322 308 4985 26 0% 0 0 168.99745
sequel (click) 473018 415191 15 112 0 0% 0 0 4.70391
binarytrees (click) 9627 8546 8 75 0 0% 0 0 3.652168
blurhash (click) 57136 49713 29 501 0 0% 0 0 20.102367
erubi (click) 228073 208487 9 108 0 0% 0 0 4.480704
etanni (click) 28241 26371 10 86 0 0% 0 0 3.318785
fannkuchredux (click) 22545 29447 3 240 0 0% 0 0 9.336614
fluentd (click) 371040 337986 3 22 0 0% 0 0 1.011262
graphql (click) 394552 336550 65 649 0 0% 0 0 22.981478
graphql-native (click) 364960 300358 41 275 0 0% 0 0 10.599289
lee (click) 257654 224057 33 567 0 0% 0 0 20.752162
matmul (click) 7323 8338 6 76 0 0% 0 0 2.961119
nbody (click) 15399 19810 9 201 0 0% 0 0 6.426359
nqueens (click) 21699 28649 8 252 0 0% 0 0 9.402874
optcarrot (click) 324183 308580 186 4508 34 0% 0 0 122.295227
protoboeuf (click) 163936 155521 15 1615 0 0% 0 0 56.94589
protoboeuf-encode (click) 235128 231105 17 1254 0 0% 0 0 38.337214
rack (click) 241306 222671 36 422 0 0% 0 0 13.686713
ruby-json (click) 23493 20746 6 160 0 0% 0 0 5.253999
rubykon (click) 140687 120490 135 1573 3 0% 0 0 51.90382
sudoku (click) 44903 40454 6 507 0 0% 0 0 18.96678
tinygql (click) 270473 230260 57 743 5 0% 0 0 24.345173
30k_ifelse (click) 6312890 5789092 9257 56443 0 0% 0 0 1909.717929
30k_methods (click) 2232791 1591091 5776 19329 0 0% 0 0 537.695034
cfunc_itself (click) 6912 5554 7 62 0 0% 0 0 2.336445
fib (click) 4585 4605 6 42 0 0% 0 0 1.880074
getivar (click) 5037 6014 6 64 0 0% 0 0 2.228885
keyword_args (click) 8181 6507 8 65 0 0% 0 0 2.676131
object-new (click) 3469 3394 5 35 0 0% 0 0 1.863884
respond_to (click) 9866 2524 7 100 0 0% 0 0 3.656867
ruby-xor (click) 4619 5278 3 52 0 0% 0 0 1.748004
setivar (click) 4188 4690 6 44 0 0% 0 0 1.798152
setivar_object (click) 4717 4838 6 46 0 0% 0 0 1.947897
setivar_young (click) 5427 5560 7 54 0 0% 0 0 2.174828
str_concat (click) 7646 7893 9 81 0 0% 0 0 3.187975
throw (click) 7384 5592 8 59 0 0% 0 0 2.378116

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.