YJIT Benchmarks

Details for Benchmarks at 2024-10-16 04:00:08 UTC

YJIT metrics from the yjit-bench suite using Ruby a4bb2491f0

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 87.9% faster than CRuby 3.4.0dev
  • 3.0% faster than YJIT 3.3.4
On railsbench it is
  • 96.8% faster than CRuby 3.4.0dev
  • 4.4% 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 409 5 417 50 593 50 619
liquid-compile 5 415 5 417 50 542 50 591
liquid-render 5 169 5 163 50 402 50 429
lobsters 5 20 5 19 50 10 50 10
mail 5 194 5 190 50 241 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 153 50 252 50 267
ruby-lsp 5 157 5 151 50 249 50 199
sequel 5 430 5 423 50 597 50 598
binarytrees 5 84 5 83 50 146 50 152
blurhash 5 82 5 84 50 127 50 146
erubi 5 115 5 144 50 87 50 113
etanni 5 90 5 100 50 52 50 64
fannkuchredux 5 52 5 56 50 101 50 107
fluentd 5 61 5 58 50 22 50 31
graphql 5 85 5 86 50 57 50 59
graphql-native 5 47 5 51 50 10 50 13
lee 5 22 5 23 50 10 50 10
matmul 5 51 5 52 50 88 50 99
nbody 5 248 5 252 50 597 50 731
nqueens 5 119 5 118 50 74 50 579
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 173 5 172 50 616 50 750
protoboeuf-encode 5 178 5 193 50 327 50 786
rack 5 574 5 615 50 947 50 1090
ruby-json 5 84 5 86 50 50 50 52
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 49 50 163 50 172
tinygql 5 37 5 36 50 24 50 25
30k_ifelse 5 28 5 28 50 214 50 193
30k_methods 5 38 5 38 50 478 50 477
cfunc_itself 5 339 5 342 50 1046 50 1135
fib 5 127 5 127 50 900 50 962
getivar 5 208 5 207 50 2266 50 2605
keyword_args 5 105 5 104 50 959 50 1231
object-new 5 321 5 269 50 406 50 306
respond_to 5 137 5 136 50 3257 50 4041
ruby-xor 5 242 5 248 50 804 50 1377
setivar 5 360 5 359 50 2719 50 5710
setivar_object 5 374 5 340 50 773 50 767
setivar_young 5 368 5 342 50 773 50 791
str_concat 5 395 5 395 50 988 50 1175
throw 5 1266 5 1103 50 1732 50 1395

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) 1452470 1256949 213 2296 0 0% 0 0 66.10428
chunky-png (click) 294366 251561 87 1141 17 1% 0 0 34.224958
erubi-rails (click) 1916621 1635274 249 2840 8 0% 0 0 75.1458
hexapdf (click) 1496717 1345523 599 13862 172 1% 0 0 392.089298
liquid-c (click) 496510 407829 119 1859 5 0% 0 0 52.097599
liquid-compile (click) 411377 322726 150 2205 2 0% 0 0 67.581016
liquid-render (click) 602316 458229 136 2473 12 0% 0 0 68.580284
lobsters (click) 8355698 7017985 3214 54484 182 0% 0 0 1829.940265
mail (click) 779784 710574 347 5488 57 1% 0 0 157.226713
psych-load (click) 255938 225097 65 661 17 2% 0 0 20.49252
railsbench (click) 3307327 2832480 1632 16751 41 0% 0 0 475.174566
rubocop (click) 5804434 5009364 2891 52176 110 0% 4 0 1519.671535
ruby-lsp (click) 848135 728312 308 4990 26 0% 0 0 139.811036
sequel (click) 463783 425479 16 126 60 47% 0 0 4.833146
binarytrees (click) 11142 10224 11 94 0 0% 1 0 3.680033
blurhash (click) 58562 51298 32 519 1 0% 1 0 16.817779
erubi (click) 223168 211564 8 103 0 0% 0 0 3.401536
etanni (click) 27697 25886 9 81 0 0% 0 0 2.749532
fannkuchredux (click) 25459 32382 8 275 0 0% 1 0 8.366761
fluentd (click) 360718 275284 10 109 0 0% 0 0 3.806703
graphql (click) 393283 352803 69 695 0 0% 0 0 20.527108
graphql-native (click) 359384 315001 40 270 0 0% 0 0 8.64143
lee (click) 281822 263517 49 810 17 2% 0 0 24.802495
matmul (click) 13259 6185 13 137 4 2% 1 0 4.563795
nbody (click) 16305 20881 11 214 0 0% 1 0 5.693996
nqueens (click) 22576 29852 10 265 4 1% 1 0 7.917773
optcarrot (click) 328602 313294 192 4559 38 0% 1 0 104.550603
protoboeuf (click) 164055 147681 16 1620 0 0% 1 0 46.540138
protoboeuf-encode (click) 235242 231452 18 1259 0 0% 1 0 32.416575
rack (click) 236112 185575 37 424 16 3% 0 0 11.438911
ruby-json (click) 27184 23973 10 188 0 0% 0 0 5.404599
rubykon (click) 142379 139044 139 1586 7 0% 0 0 45.504122
sudoku (click) 48533 43950 10 542 7 1% 0 0 16.22397
tinygql (click) 271574 239479 62 795 20 2% 0 0 22.833987
30k_ifelse (click) 6316871 5792988 9263 56487 0 0% 0 0 1567.593912
30k_methods (click) 2236987 1595260 5783 19377 0 0% 1 0 450.464648
cfunc_itself (click) 8338 7115 10 80 0 0% 1 0 2.574281
fib (click) 5462 5676 8 55 0 0% 1 0 2.011048
getivar (click) 6458 7570 9 82 0 0% 1 0 2.520448
keyword_args (click) 9063 7603 10 78 0 0% 1 0 2.68502
object-new (click) 4675 4743 7 49 1 2% 0 0 1.810198
respond_to (click) 10528 3322 8 109 0 0% 0 0 3.224274
ruby-xor (click) 7863 8513 9 90 2 2% 1 0 2.812673
setivar (click) 5394 5973 8 58 0 0% 0 0 2.004979
setivar_object (click) 6138 6394 9 64 0 0% 1 0 2.310253
setivar_young (click) 6848 7116 10 72 0 0% 1 0 2.44284
str_concat (click) 9072 9524 12 99 3 3% 1 0 3.228572
throw (click) 8595 6880 10 73 0 0% 0 0 2.632746

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.