YJIT Benchmarks

Details for Benchmarks at 2024-10-21 03:46:34 UTC

YJIT metrics from the yjit-bench suite using Ruby 75ef89ca16

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 89.0% faster than CRuby 3.4.0dev
  • 4.6% faster than YJIT 3.3.4
On railsbench it is
  • 101.7% faster than CRuby 3.4.0dev
  • 3.0% 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 83 5 82 50 157 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 410 5 418 50 573 50 620
liquid-compile 5 411 5 408 50 543 50 558
liquid-render 5 170 5 167 50 404 50 427
lobsters 5 20 5 19 50 10 50 10
mail 5 189 5 192 50 238 50 245
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 156 5 154 50 250 50 262
ruby-lsp 5 157 5 158 50 246 50 253
sequel 5 423 5 422 50 574 50 589
binarytrees 5 84 5 82 50 149 50 152
blurhash 5 82 5 83 50 128 50 146
erubi 5 114 5 145 50 95 50 126
etanni 5 90 5 101 50 52 50 63
fannkuchredux 5 52 5 56 50 101 50 107
fluentd 5 61 5 62 50 22 50 34
graphql 5 85 5 85 50 56 50 57
graphql-native 5 40 5 53 50 10 50 13
lee 5 23 5 23 50 10 50 10
matmul 5 51 5 52 50 88 50 99
nbody 5 248 5 252 50 595 50 726
nqueens 5 119 5 119 50 74 50 582
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 173 5 174 50 617 50 746
protoboeuf-encode 5 179 5 193 50 331 50 778
rack 5 579 5 616 50 956 50 1081
ruby-json 5 85 5 85 50 50 50 51
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 49 50 163 50 171
tinygql 5 37 5 36 50 24 50 24
30k_ifelse 5 28 5 28 50 214 50 193
30k_methods 5 38 5 38 50 484 50 476
cfunc_itself 5 347 5 337 50 1046 50 1135
fib 5 127 5 126 50 900 50 962
getivar 5 206 5 205 50 2268 50 2594
keyword_args 5 108 5 103 50 959 50 1231
object-new 5 321 5 268 50 407 50 301
respond_to 5 137 5 133 50 3258 50 4042
ruby-xor 5 242 5 250 50 803 50 1383
setivar 5 361 5 358 50 3122 50 5718
setivar_object 5 371 5 339 50 764 50 798
setivar_young 5 347 5 341 50 771 50 841
str_concat 5 398 5 398 50 988 50 1179
throw 5 1265 5 1094 50 1719 50 1412

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) 1465011 1196866 213 2296 0 0% 0 0 65.721118
chunky-png (click) 296866 284928 86 1133 1 0% 0 0 33.581475
erubi-rails (click) 1928576 1684848 249 2841 8 0% 0 0 78.156442
hexapdf (click) 1523402 1332708 597 13850 40 0% 0 0 397.107479
liquid-c (click) 502667 415953 122 1906 5 0% 0 0 53.291759
liquid-compile (click) 443412 374206 150 2184 2 0% 0 0 66.479776
liquid-render (click) 635897 495387 139 2520 12 0% 0 0 69.798389
lobsters (click) 8320788 7015085 3213 54279 183 0% 0 0 1835.881168
mail (click) 742372 693481 346 5481 16 0% 0 0 158.516689
psych-load (click) 262132 231647 64 654 3 0% 0 0 20.406611
railsbench (click) 3307083 2814408 1635 16736 41 0% 0 0 479.726182
rubocop (click) 5814610 5051970 2891 52185 110 0% 4 0 1509.601308
ruby-lsp (click) 888253 716804 308 4990 26 0% 0 0 139.199783
sequel (click) 481547 439133 15 118 0 0% 0 0 4.484539
binarytrees (click) 9627 8546 8 75 0 0% 0 0 3.023942
blurhash (click) 57136 49713 29 501 0 0% 0 0 16.240853
erubi (click) 255659 239280 9 108 0 0% 0 0 3.683487
etanni (click) 24162 22865 9 82 0 0% 0 0 2.794031
fannkuchredux (click) 24038 30826 5 257 0 0% 0 0 7.755449
fluentd (click) 349968 296986 10 109 0 0% 0 0 3.94711
graphql (click) 388953 332766 69 695 0 0% 0 0 20.431934
graphql-native (click) 389094 332429 40 270 0 0% 0 0 8.551681
lee (click) 294810 267853 48 803 0 0% 0 0 24.72023
matmul (click) 11838 4563 10 119 0 0% 0 0 3.996112
nbody (click) 14884 19325 8 196 0 0% 0 0 5.135011
nqueens (click) 21155 28164 7 247 0 0% 0 0 7.27564
optcarrot (click) 327944 312320 190 4549 34 0% 0 0 105.726924
protoboeuf (click) 163392 155036 14 1610 0 0% 0 0 45.94202
protoboeuf-encode (click) 234584 230620 16 1249 0 0% 0 0 31.910952
rack (click) 237014 216803 36 417 0 0% 0 0 11.046619
ruby-json (click) 27184 23973 10 188 0 0% 0 0 5.377351
rubykon (click) 140297 120385 138 1566 3 0% 0 0 44.912923
sudoku (click) 48090 43120 9 536 0 0% 0 0 15.928699
tinygql (click) 275957 251814 61 787 5 0% 0 0 22.166352
30k_ifelse (click) 6315665 5791705 9261 56473 0 0% 0 0 1574.723762
30k_methods (click) 2235566 1593704 5780 19359 0 0% 0 0 449.07933
cfunc_itself (click) 6912 5554 7 62 0 0% 0 0 1.964827
fib (click) 4041 4120 5 37 0 0% 0 0 1.444723
getivar (click) 5037 6014 6 64 0 0% 0 0 1.91314
keyword_args (click) 7637 6022 7 60 0 0% 0 0 2.052951
object-new (click) 3469 3394 5 35 0 0% 0 0 1.375552
respond_to (click) 9322 2039 6 95 0 0% 0 0 2.713717
ruby-xor (click) 6437 6880 6 72 0 0% 0 0 2.234466
setivar (click) 4188 4690 6 44 0 0% 0 0 1.573585
setivar_object (click) 4717 4838 6 46 0 0% 0 0 1.669214
setivar_young (click) 5427 5560 7 54 0 0% 0 0 1.848115
str_concat (click) 7646 7893 9 81 0 0% 0 0 2.703113
throw (click) 7384 5592 8 59 0 0% 0 0 2.145831

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.