YJIT Benchmarks

Details for Benchmarks at 2024-09-02 03:41:27 UTC

YJIT metrics from the yjit-bench suite using Ruby 73c39a5f93

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 74.6% faster than CRuby 3.4.0dev
  • 2.8% faster than YJIT 3.3.4
On railsbench it is
  • 82.1% faster than CRuby 3.4.0dev
  • 2.4% 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 58 10 147 10 148
chunky-png 10 18 10 18 10 36 10 41
erubi-rails 10 10 10 10 10 22 10 23
hexapdf 10 10 10 10 10 10 10 10
liquid-c 10 342 10 350 10 485 10 513
liquid-compile 10 346 10 338 10 500 10 505
liquid-render 10 137 10 137 10 357 10 372
lobsters 10 13 10 13 10 24 10 22
mail 10 158 10 159 10 232 10 230
psych-load 10 10 10 10 10 10 10 10
railsbench 10 10 10 10 10 10 10 10
rubocop 10 135 10 132 10 235 10 239
ruby-lsp 10 128 10 115 10 220 10 186
sequel 10 316 10 320 10 429 10 435
binarytrees 10 51 10 51 10 118 10 114
blurhash 10 62 10 61 10 120 10 144
erubi 10 80 10 98 10 102 10 123
etanni 10 59 10 65 10 69 10 76
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 32 10 33 10 34
lee 10 11 10 12 10 20 10 20
matmul 10 10 10 10 10 15 10 18
nbody 10 203 10 203 10 421 10 514
nqueens 10 112 10 115 10 113 10 439
optcarrot 10 10 10 10 10 10 10 10
protoboeuf 10 158 10 152 10 582 10 697
protoboeuf-encode 10 133 10 169 10 292 10 653
rack 10 461 10 466 10 844 10 944
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 23 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 245 10 268 10 1108 10 1212
fib 10 102 10 98 10 616 10 623
getivar 10 214 10 230 10 1253 10 1738
keyword_args 10 88 10 90 10 730 10 949
object-new 10 229 10 189 10 309 10 240
respond_to 10 89 10 97 10 1785 10 2217
ruby-xor 10 30 10 30 10 92 10 178
setivar 10 348 10 378 10 2319 10 3099
setivar_object 10 216 10 233 10 536 10 511
setivar_young 10 216 10 233 10 528 10 509
str_concat 10 319 10 356 10 658 10 721
throw 10 971 10 816 10 1347 10 1059

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) 1457100 1237973 214 2301 0 0% 0 0 87.461034
chunky-png (click) 293075 271212 82 1090 1 0% 0 0 37.885659
erubi-rails (click) 1929706 1674481 245 2830 8 0% 0 0 100.379206
hexapdf (click) 1365829 1184696 507 12609 40 0% 0 0 447.748723
liquid-c (click) 507100 429302 118 1855 5 0% 0 0 62.196025
liquid-compile (click) 409386 301034 150 2181 2 0% 0 0 78.590163
liquid-render (click) 601849 503991 135 2472 12 0% 0 0 83.684359
lobsters (click) 8104143 6839785 3076 51817 183 0% 0 0 2387.485708
mail (click) 740884 658976 346 5481 16 0% 0 0 189.580756
psych-load (click) 250416 216725 60 613 3 0% 0 0 22.820251
railsbench (click) 3328751 2869775 1631 16704 41 0% 0 0 641.071598
rubocop (click) 5817438 4952709 2892 52177 110 0% 4 0 2020.523666
ruby-lsp (click) 863080 713119 308 4991 26 0% 0 0 172.544178
sequel (click) 492200 446864 15 123 0 0% 0 0 6.023301
binarytrees (click) 9627 8546 8 75 0 0% 0 0 3.488473
blurhash (click) 57136 49713 29 501 0 0% 0 0 20.304078
erubi (click) 237689 184470 9 108 0 0% 0 0 4.368819
etanni (click) 24711 23355 10 87 0 0% 0 0 3.420032
fannkuchredux (click) 22545 29447 3 240 0 0% 0 0 9.207987
fluentd (click) 334280 283322 3 22 0 0% 0 0 1.053562
graphql (click) 399683 357102 65 649 0 0% 0 0 23.249443
graphql-native (click) 369989 323359 40 270 0 0% 0 0 10.543175
lee (click) 254981 217775 33 567 0 0% 0 0 21.131863
matmul (click) 7323 8338 6 76 0 0% 0 0 2.995911
nbody (click) 15399 19810 9 201 0 0% 0 0 6.405251
nqueens (click) 21699 28649 8 252 0 0% 0 0 9.321541
optcarrot (click) 324183 308580 186 4508 34 0% 0 0 123.130616
protoboeuf (click) 163936 155521 15 1615 0 0% 0 0 57.229661
protoboeuf-encode (click) 235128 231105 17 1254 0 0% 0 0 38.675784
rack (click) 245119 192107 36 425 0 0% 0 0 13.78773
ruby-json (click) 24342 21342 6 159 0 0% 0 0 5.276757
rubykon (click) 141916 129834 135 1583 3 0% 0 0 53.342783
sudoku (click) 44903 40454 6 507 0 0% 0 0 18.9089
tinygql (click) 274506 232704 57 743 5 0% 0 0 24.86018
30k_ifelse (click) 6312890 5789092 9257 56443 0 0% 0 0 2254.368
30k_methods (click) 2232791 1591091 5776 19329 0 0% 0 0 540.889967
cfunc_itself (click) 6912 5554 7 62 0 0% 0 0 2.268005
fib (click) 4585 4605 6 42 0 0% 0 0 1.972228
getivar (click) 5037 6014 6 64 0 0% 0 0 2.105045
keyword_args (click) 8181 6507 8 65 0 0% 0 0 2.604518
object-new (click) 3469 3394 5 35 0 0% 0 0 1.828949
respond_to (click) 9866 2524 7 100 0 0% 0 0 3.562953
ruby-xor (click) 4619 5278 3 52 0 0% 0 0 1.755388
setivar (click) 4188 4690 6 44 0 0% 0 0 1.689667
setivar_object (click) 4717 4838 6 46 0 0% 0 0 1.836311
setivar_young (click) 5427 5560 7 54 0 0% 0 0 2.081531
str_concat (click) 7646 7893 9 81 0 0% 0 0 3.153104
throw (click) 7384 5592 8 59 0 0% 0 0 2.442658

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.