YJIT Benchmarks

Details for Benchmarks at 2024-10-19 03:44:15 UTC

YJIT metrics from the yjit-bench suite using Ruby 7be9a333ca

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 87.8% faster than CRuby 3.4.0dev
  • 2.4% faster than YJIT 3.3.4
On railsbench it is
  • 99.0% faster than CRuby 3.4.0dev
  • 5.1% 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 84 5 82 50 156 50 162
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 409 5 418 50 595 50 626
liquid-compile 5 412 5 407 50 545 50 587
liquid-render 5 168 5 163 50 405 50 432
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 193 50 251 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 252 50 267
ruby-lsp 5 156 5 144 50 244 50 195
sequel 5 431 5 424 50 595 50 564
binarytrees 5 84 5 84 50 146 50 152
blurhash 5 82 5 83 50 128 50 146
erubi 5 122 5 146 50 90 50 116
etanni 5 90 5 101 50 52 50 63
fannkuchredux 5 52 5 56 50 100 50 111
fluentd 5 61 5 69 50 23 50 25
graphql 5 86 5 86 50 56 50 59
graphql-native 5 40 5 51 50 10 50 14
lee 5 22 5 23 50 10 50 10
matmul 5 52 5 52 50 88 50 99
nbody 5 248 5 249 50 595 50 726
nqueens 5 119 5 119 50 74 50 580
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 174 5 173 50 616 50 745
protoboeuf-encode 5 178 5 193 50 328 50 778
rack 5 587 5 622 50 945 50 1084
ruby-json 5 85 5 85 50 50 50 51
rubykon 5 21 5 20 50 10 50 10
sudoku 5 48 5 49 50 164 50 171
tinygql 5 36 5 36 50 24 50 24
30k_ifelse 5 28 5 28 50 214 50 193
30k_methods 5 39 5 39 50 481 50 479
cfunc_itself 5 345 5 337 50 1046 50 1135
fib 5 127 5 126 50 900 50 962
getivar 5 206 5 205 50 2268 50 2592
keyword_args 5 108 5 103 50 959 50 1231
object-new 5 320 5 268 50 406 50 303
respond_to 5 137 5 133 50 3257 50 4042
ruby-xor 5 244 5 249 50 803 50 1380
setivar 5 361 5 358 50 3126 50 5716
setivar_object 5 372 5 339 50 764 50 798
setivar_young 5 371 5 341 50 771 50 839
str_concat 5 399 5 397 50 990 50 1187
throw 5 1267 5 1094 50 1715 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) 1456520 1197140 213 2296 0 0% 0 0 66.387979
chunky-png (click) 329500 289425 86 1138 1 0% 0 0 33.574141
erubi-rails (click) 1931018 1612994 248 2862 8 0% 0 0 77.620965
hexapdf (click) 1491606 1345109 597 13851 40 0% 0 0 393.524575
liquid-c (click) 506882 396813 122 1906 5 0% 0 0 53.349716
liquid-compile (click) 401933 339796 150 2194 2 0% 0 0 66.782724
liquid-render (click) 611411 491467 139 2520 12 0% 0 0 70.263238
lobsters (click) 8338265 7042346 3212 54470 181 0% 0 0 1856.993175
mail (click) 735737 630968 346 5481 16 0% 0 0 159.496782
psych-load (click) 253453 237177 64 656 3 0% 0 0 20.554499
railsbench (click) 3300644 2826811 1635 16742 41 0% 0 0 476.502213
rubocop (click) 5805675 4968763 2891 52120 110 0% 4 0 1513.525693
ruby-lsp (click) 851293 754968 308 4986 26 0% 0 0 138.162318
sequel (click) 457814 400288 15 118 0 0% 0 0 4.018914
binarytrees (click) 9627 8546 8 75 0 0% 0 0 3.01482
blurhash (click) 57136 49713 29 501 0 0% 0 0 16.174549
erubi (click) 216280 198752 9 108 0 0% 0 0 3.621914
etanni (click) 27697 25886 9 81 0 0% 0 0 2.746586
fannkuchredux (click) 24038 30826 5 257 0 0% 0 0 7.784504
fluentd (click) 378752 297188 10 109 0 0% 0 0 3.75685
graphql (click) 401892 360115 69 695 0 0% 0 0 20.428318
graphql-native (click) 365320 309588 40 270 0 0% 0 0 8.607178
lee (click) 310192 280480 48 803 0 0% 0 0 24.825106
matmul (click) 11838 4563 10 119 0 0% 0 0 3.985152
nbody (click) 14884 19325 8 196 0 0% 0 0 5.093577
nqueens (click) 21155 28164 7 247 0 0% 0 0 7.338765
optcarrot (click) 327944 312320 190 4549 34 0% 0 0 106.287715
protoboeuf (click) 163392 155036 14 1610 0 0% 0 0 46.265
protoboeuf-encode (click) 234584 230620 16 1249 0 0% 0 0 31.98441
rack (click) 237241 209022 36 420 0 0% 0 0 11.2805
ruby-json (click) 21333 18570 10 187 0 0% 0 0 5.369548
rubykon (click) 140297 120385 138 1566 3 0% 0 0 44.736107
sudoku (click) 48090 43120 9 536 0 0% 0 0 15.9851
tinygql (click) 280108 239771 61 787 5 0% 0 0 22.447881
30k_ifelse (click) 6315665 5791705 9261 56473 0 0% 0 0 1587.555639
30k_methods (click) 2235566 1593704 5780 19359 0 0% 0 0 454.554344
cfunc_itself (click) 6912 5554 7 62 0 0% 0 0 1.990385
fib (click) 4041 4120 5 37 0 0% 0 0 1.456769
getivar (click) 5037 6014 6 64 0 0% 0 0 1.909916
keyword_args (click) 7637 6022 7 60 0 0% 0 0 2.081731
object-new (click) 3469 3394 5 35 0 0% 0 0 1.329778
respond_to (click) 9322 2039 6 95 0 0% 0 0 2.772336
ruby-xor (click) 6437 6880 6 72 0 0% 0 0 2.254582
setivar (click) 4188 4690 6 44 0 0% 0 0 1.577238
setivar_object (click) 4717 4838 6 46 0 0% 0 0 1.681912
setivar_young (click) 5427 5560 7 54 0 0% 0 0 1.902758
str_concat (click) 7646 7893 9 81 0 0% 0 0 2.642171
throw (click) 7384 5592 8 59 0 0% 0 0 2.114101

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.