YJIT Benchmarks

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

YJIT metrics from the yjit-bench suite using Ruby 81b74c9fad

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 74.9% faster than CRuby 3.4.0dev
  • 2.4% faster than YJIT 3.3.4
On railsbench it is
  • 77.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 48 10 49 10 117 10 119
chunky-png 10 18 10 16 10 36 10 41
erubi-rails 10 10 10 10 10 21 10 19
hexapdf 10 10 10 10 10 10 10 10
liquid-c 10 340 10 349 10 497 10 515
liquid-compile 10 344 10 341 10 499 10 495
liquid-render 10 137 10 135 10 357 10 373
lobsters 10 14 10 13 10 25 10 23
mail 10 159 10 159 10 238 10 231
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 234 10 241
ruby-lsp 10 127 10 122 10 217 10 221
sequel 10 317 10 319 10 439 10 439
binarytrees 10 51 10 50 10 118 10 112
blurhash 10 62 10 63 10 120 10 144
erubi 10 84 10 96 10 105 10 119
etanni 10 60 10 65 10 69 10 77
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 29 10 29 10 33 10 34
lee 10 11 10 12 10 20 10 21
matmul 10 10 10 10 10 15 10 17
nbody 10 203 10 214 10 421 10 520
nqueens 10 112 10 113 10 113 10 449
optcarrot 10 10 10 10 10 10 10 10
protoboeuf 10 181 10 182 10 572 10 631
protoboeuf-encode 10 125 10 152 10 283 10 636
rack 10 458 10 471 10 837 10 874
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 32
tinygql 10 23 10 23 10 52 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 255 10 1108 10 1211
fib 10 101 10 100 10 616 10 623
getivar 10 215 10 224 10 1245 10 1732
keyword_args 10 86 10 89 10 730 10 947
object-new 10 229 10 191 10 308 10 236
respond_to 10 91 10 90 10 1786 10 2216
ruby-xor 10 30 10 25 10 92 10 181
setivar 10 346 10 409 10 2319 10 3120
setivar_object 10 216 10 254 10 537 10 626
setivar_young 10 216 10 254 10 528 10 625
str_concat 10 319 10 348 10 659 10 721
throw 10 973 10 824 10 1345 10 1029

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) 1469690 1241818 214 2299 0 0% 0 0 80.678404
chunky-png (click) 299652 263276 82 1090 1 0% 0 0 37.205118
erubi-rails (click) 1736519 1469727 274 3003 6 0% 0 0 96.07502
hexapdf (click) 1368080 1239745 507 12607 34 0% 0 0 433.797315
liquid-c (click) 492785 464364 118 1858 5 0% 0 0 60.606301
liquid-compile (click) 412316 347606 150 2190 2 0% 0 0 77.657002
liquid-render (click) 598819 488140 135 2472 12 0% 0 0 81.090912
lobsters (click) 8197679 6826008 3078 51510 86 0% 0 0 2059.583505
mail (click) 771245 725922 346 5481 16 0% 0 0 186.782768
psych-load (click) 257952 211163 60 613 3 0% 0 0 22.151749
railsbench (click) 3130788 2694074 1636 16735 57 0% 0 0 564.082993
rubocop (click) 5820770 4890325 2892 52194 110 0% 4 0 1860.02429
ruby-lsp (click) 848916 813444 308 4985 26 0% 0 0 166.759988
sequel (click) 464901 389872 15 124 0 0% 0 0 5.686667
binarytrees (click) 9627 8546 8 75 0 0% 0 0 3.373584
blurhash (click) 57136 49713 29 501 0 0% 0 0 19.913589
erubi (click) 226962 199394 9 108 0 0% 0 0 4.145546
etanni (click) 28250 26371 10 86 0 0% 0 0 3.313544
fannkuchredux (click) 22545 29447 3 240 0 0% 0 0 9.19881
fluentd (click) 342623 314181 3 22 0 0% 0 0 1.049366
graphql (click) 406673 339972 65 649 0 0% 0 0 22.79057
graphql-native (click) 359342 297517 40 270 0 0% 0 0 9.864009
lee (click) 259920 216693 33 567 0 0% 0 0 20.445133
matmul (click) 7323 8338 6 76 0 0% 0 0 2.873798
nbody (click) 15399 19810 9 201 0 0% 0 0 6.424009
nqueens (click) 21699 28649 8 252 0 0% 0 0 9.247311
optcarrot (click) 324183 308580 186 4508 34 0% 0 0 122.085847
protoboeuf (click) 147776 155834 15 1438 0 0% 0 0 51.85192
protoboeuf-encode (click) 221137 218623 17 1204 0 0% 0 0 37.072177
rack (click) 230859 228624 36 417 0 0% 0 0 13.495693
ruby-json (click) 24342 21342 6 160 0 0% 0 0 5.197158
rubykon (click) 142995 139203 135 1593 3 0% 0 0 53.158841
sudoku (click) 44903 40454 6 507 0 0% 0 0 18.777751
tinygql (click) 260407 220345 57 743 5 0% 0 0 24.605425
30k_ifelse (click) 6312890 5789092 9257 56443 0 0% 0 0 1898.679058
30k_methods (click) 2232791 1591091 5776 19329 0 0% 0 0 544.268284
cfunc_itself (click) 6912 5554 7 62 0 0% 0 0 2.248764
fib (click) 4585 4605 6 42 0 0% 0 0 1.833383
getivar (click) 5037 6014 6 64 0 0% 0 0 2.128794
keyword_args (click) 8181 6507 8 65 0 0% 0 0 2.590616
object-new (click) 3469 3394 5 35 0 0% 0 0 1.964477
respond_to (click) 9866 2524 7 100 0 0% 0 0 3.591715
ruby-xor (click) 4619 5278 3 52 0 0% 0 0 1.770787
setivar (click) 4188 4690 6 44 0 0% 0 0 1.666096
setivar_object (click) 4717 4838 6 46 0 0% 0 0 1.818483
setivar_young (click) 5427 5560 7 54 0 0% 0 0 2.070372
str_concat (click) 7646 7893 9 81 0 0% 0 0 3.213807
throw (click) 7384 5592 8 59 0 0% 0 0 2.474747

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.