YJIT Benchmarks

Details for Benchmarks at 2024-10-23 03:45:11 UTC

YJIT metrics from the yjit-bench suite using Ruby 0de8b533de

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 87.1% faster than CRuby 3.4.0dev
  • 2.6% faster than YJIT 3.3.4
On railsbench it is
  • 105.4% faster than CRuby 3.4.0dev
  • 5.9% 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 5 82 5 81 50 156 50 161
chunky-png 5 31 5 31 50 15 50 20
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 413 5 416 50 594 50 624
liquid-compile 5 411 5 408 50 544 50 559
liquid-render 5 166 5 164 50 407 50 438
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 192 50 237 50 235
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 156 5 153 50 252 50 266
ruby-lsp 5 157 5 156 50 252 50 194
sequel 5 422 5 418 50 580 50 561
binarytrees 5 83 5 82 50 146 50 150
blurhash 5 82 5 84 50 127 50 146
erubi 5 122 5 147 50 84 50 130
etanni 5 90 5 100 50 52 50 62
fannkuchredux 5 52 5 55 50 100 50 105
fluentd 5 61 5 65 50 22 50 33
graphql 5 85 5 83 50 56 50 54
graphql-native 5 40 5 51 50 10 50 14
lee 5 23 5 23 50 10 50 10
matmul 5 51 5 52 50 88 50 98
nbody 5 249 5 250 50 593 50 719
nqueens 5 119 5 116 50 74 50 579
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 174 5 171 50 617 50 683
protoboeuf-encode 5 178 5 192 50 328 50 786
rack 5 592 5 628 50 951 50 1065
ruby-json 5 85 5 84 50 51 50 50
rubykon 5 20 5 20 50 10 50 10
sudoku 5 48 5 48 50 163 50 172
tinygql 5 36 5 36 50 24 50 26
30k_ifelse 5 28 5 28 50 214 50 194
30k_methods 5 39 5 38 50 483 50 473
cfunc_itself 5 345 5 343 50 1042 50 1134
fib 5 127 5 127 50 896 50 962
getivar 5 206 5 205 50 2269 50 2597
keyword_args 5 108 5 104 50 956 50 1229
object-new 5 321 5 268 50 407 50 292
respond_to 5 137 5 135 50 3245 50 4021
ruby-xor 5 242 5 249 50 803 50 1375
setivar 5 360 5 359 50 3128 50 5690
setivar_object 5 372 5 340 50 761 50 841
setivar_young 5 371 5 342 50 771 50 840
str_concat 5 399 5 390 50 986 50 1184
throw 5 1261 5 1119 50 1740 50 1429

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) 1445650 1253286 213 2296 0 0% 0 0 65.932947
chunky-png (click) 299400 247645 86 1133 1 0% 0 0 33.399286
erubi-rails (click) 1939631 1684866 249 2843 8 0% 0 0 77.489307
hexapdf (click) 1499070 1264049 598 13857 35 0% 0 0 397.626614
liquid-c (click) 524643 434856 122 1906 5 0% 0 0 53.258636
liquid-compile (click) 431093 348339 150 2212 2 0% 0 0 67.500028
liquid-render (click) 615269 536594 139 2520 12 0% 0 0 70.324767
lobsters (click) 8319069 6961300 3213 54395 181 0% 0 0 1845.251177
mail (click) 740331 701275 346 5490 16 0% 0 0 159.793855
psych-load (click) 271170 222135 64 656 3 0% 0 0 20.889308
railsbench (click) 3306947 2789438 1635 16739 41 0% 0 0 476.075823
rubocop (click) 5806285 5084412 2891 52131 110 0% 4 0 1541.00056
ruby-lsp (click) 847757 771030 308 4986 26 0% 0 0 141.450578
sequel (click) 491890 446656 15 121 0 0% 0 0 4.534003
binarytrees (click) 9721 8668 8 76 0 0% 0 0 3.121864
blurhash (click) 57136 49713 29 501 0 0% 0 0 16.258957
erubi (click) 227282 207260 9 108 0 0% 0 0 3.639306
etanni (click) 27697 25886 9 81 0 0% 0 0 2.725522
fannkuchredux (click) 24038 30826 5 257 0 0% 0 0 7.848638
fluentd (click) 352729 317412 10 109 0 0% 0 0 3.867856
graphql (click) 403667 363261 69 695 0 0% 0 0 20.67927
graphql-native (click) 376395 322840 40 270 0 0% 0 0 8.67609
lee (click) 281403 223503 48 803 0 0% 0 0 24.646276
matmul (click) 11838 4563 10 119 0 0% 0 0 3.954379
nbody (click) 14884 19325 8 196 0 0% 0 0 5.106738
nqueens (click) 21155 28164 7 247 0 0% 0 0 7.363209
optcarrot (click) 327944 312320 190 4549 34 0% 0 0 103.723287
protoboeuf (click) 163392 155036 14 1610 0 0% 0 0 46.342627
protoboeuf-encode (click) 234584 230620 16 1249 0 0% 0 0 32.01622
rack (click) 232167 197009 36 417 0 0% 0 0 10.758367
ruby-json (click) 27105 23915 10 189 0 0% 0 0 5.453038
rubykon (click) 140693 120664 138 1568 3 0% 0 0 44.979326
sudoku (click) 48090 43120 9 536 0 0% 0 0 16.24294
tinygql (click) 273743 257424 61 787 5 0% 0 0 22.341926
30k_ifelse (click) 6315665 5791705 9261 56473 0 0% 0 0 1595.896202
30k_methods (click) 2235566 1593704 5780 19359 0 0% 0 0 458.097935
cfunc_itself (click) 6912 5554 7 62 0 0% 0 0 1.986371
fib (click) 4041 4120 5 37 0 0% 0 0 1.384996
getivar (click) 5037 6014 6 64 0 0% 0 0 1.905904
keyword_args (click) 7637 6022 7 60 0 0% 0 0 2.034393
object-new (click) 3469 3394 5 35 0 0% 0 0 1.373339
respond_to (click) 9322 2039 6 95 0 0% 0 0 2.688259
ruby-xor (click) 6437 6880 6 72 0 0% 0 0 2.234365
setivar (click) 4188 4690 6 44 0 0% 0 0 1.551446
setivar_object (click) 4717 4838 6 46 0 0% 0 0 1.671801
setivar_young (click) 5427 5560 7 54 0 0% 0 0 1.898763
str_concat (click) 7646 7893 9 81 0 0% 0 0 2.660742
throw (click) 7384 5592 8 59 0 0% 0 0 2.164077

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.