YJIT Benchmarks

Details for Benchmarks at 2024-11-11 03:44:48 UTC

YJIT metrics from the yjit-bench suite using Ruby 768f2d1018

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 86.7% faster than CRuby 3.4.0dev
  • 3.5% faster than YJIT 3.3.4
On railsbench it is
  • 99.3% faster than CRuby 3.4.0dev
  • 3.8% 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 158 50 160
chunky-png 5 31 5 32 50 14 50 19
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 423 5 426 50 596 50 607
liquid-compile 5 410 5 407 50 543 50 553
liquid-render 5 169 5 168 50 404 50 424
lobsters 5 20 5 20 50 10 50 10
mail 5 187 5 192 50 238 50 242
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 156 5 155 50 252 50 264
ruby-lsp 5 155 5 153 50 242 50 262
sequel 5 429 5 418 50 596 50 568
binarytrees 5 84 5 83 50 146 50 147
blurhash 5 82 5 83 50 127 50 145
erubi 5 99 5 146 50 28 50 129
etanni 5 90 5 96 50 52 50 61
fannkuchredux 5 52 5 55 50 100 50 105
fluentd 5 61 5 61 50 23 50 23
graphql 5 85 5 85 50 56 50 56
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 248 5 256 50 595 50 706
nqueens 5 117 5 119 50 74 50 563
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 174 5 170 50 615 50 668
protoboeuf-encode 5 177 5 200 50 326 50 771
rack 5 575 5 634 50 936 50 1042
ruby-json 5 84 5 82 50 50 50 49
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 48 50 163 50 161
tinygql 5 36 5 36 50 24 50 25
30k_ifelse 5 28 5 27 50 213 50 191
30k_methods 5 39 5 38 50 476 50 477
cfunc_itself 5 340 5 343 50 1046 50 1136
fib 5 127 5 127 50 901 50 963
getivar 5 209 5 216 50 2269 50 2623
keyword_args 5 105 5 103 50 959 50 1231
object-new 5 322 5 319 50 407 50 396
respond_to 5 137 5 139 50 3255 50 4041
ruby-xor 5 241 5 250 50 804 50 1379
setivar 5 360 5 358 50 3125 50 5701
setivar_object 5 374 5 342 50 774 50 841
setivar_young 5 373 5 344 50 772 50 847
str_concat 5 397 5 404 50 987 50 1169
throw 5 1268 5 1327 50 1726 50 1687

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) 1448701 1190750 213 2296 0 0% 0 0 66.844793
chunky-png (click) 296901 284928 86 1133 1 0% 0 0 34.029083
erubi-rails (click) 1945604 1659374 249 2870 8 0% 0 0 78.846152
hexapdf (click) 1492418 1314882 598 13856 40 0% 0 0 393.728232
liquid-c (click) 494644 414590 119 1852 5 0% 0 0 50.647104
liquid-compile (click) 412960 373447 150 2211 2 0% 0 0 68.201485
liquid-render (click) 608072 512933 136 2466 12 0% 0 0 70.11643
lobsters (click) 8313460 6991260 3215 54214 181 0% 0 0 1830.178444
mail (click) 775528 705108 346 5481 16 0% 0 0 157.504405
psych-load (click) 253217 239297 64 656 3 0% 0 0 20.776895
railsbench (click) 3298369 2841136 1633 16674 41 0% 0 0 477.670487
rubocop (click) 5838007 5038113 2891 52173 110 0% 4 0 1518.742388
ruby-lsp (click) 863115 753729 308 4990 26 0% 0 0 140.118804
sequel (click) 469082 399840 15 114 0 0% 0 0 4.123122
binarytrees (click) 9721 8668 8 76 0 0% 0 0 3.102749
blurhash (click) 57136 49713 29 501 0 0% 0 0 16.038997
erubi (click) 228382 200415 9 108 0 0% 0 0 3.646568
etanni (click) 27632 25826 9 85 0 0% 0 0 2.884982
fannkuchredux (click) 24038 30826 5 257 0 0% 0 0 7.64725
fluentd (click) 375195 319437 10 109 0 0% 0 0 3.780351
graphql (click) 397315 314979 69 695 0 0% 0 0 20.269943
graphql-native (click) 393713 328233 40 270 0 0% 0 0 8.52727
lee (click) 306575 277482 48 803 0 0% 0 0 24.486113
matmul (click) 11838 4563 10 119 0 0% 0 0 3.985982
nbody (click) 14884 19325 8 196 0 0% 0 0 5.124074
nqueens (click) 21155 28164 7 247 0 0% 0 0 7.30074
optcarrot (click) 327944 312320 190 4549 34 0% 0 0 105.604597
protoboeuf (click) 163392 155036 14 1610 0 0% 0 0 46.21742
protoboeuf-encode (click) 234584 230620 16 1249 0 0% 0 0 31.952867
rack (click) 265791 234723 36 420 0 0% 0 0 11.308588
ruby-json (click) 24665 21345 10 187 0 0% 0 0 5.302397
rubykon (click) 141931 138312 138 1580 3 0% 0 0 44.91158
sudoku (click) 48090 43120 9 536 0 0% 0 0 15.878508
tinygql (click) 275325 251084 61 787 5 0% 0 0 22.233636
30k_ifelse (click) 6315665 5791705 9261 56473 0 0% 0 0 1572.030293
30k_methods (click) 2235566 1593704 5780 19359 0 0% 0 0 451.890252
cfunc_itself (click) 6912 5554 7 62 0 0% 0 0 2.006912
fib (click) 4041 4120 5 37 0 0% 0 0 1.502686
getivar (click) 5037 6014 6 64 0 0% 0 0 1.927809
keyword_args (click) 7637 6022 7 60 0 0% 0 0 2.105877
object-new (click) 3469 3394 5 35 0 0% 0 0 1.37572
respond_to (click) 9322 2039 6 95 0 0% 0 0 2.7436
ruby-xor (click) 6437 6880 6 72 0 0% 0 0 2.220663
setivar (click) 4188 4690 6 44 0 0% 0 0 1.588977
setivar_object (click) 4717 4838 6 46 0 0% 0 0 1.668971
setivar_young (click) 5427 5560 7 54 0 0% 0 0 1.893873
str_concat (click) 7646 7893 9 81 0 0% 0 0 2.656895
throw (click) 7384 5592 8 59 0 0% 0 0 2.179932

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.