YJIT Benchmarks

Details for Benchmarks at 2024-11-19 03:49:08 UTC

YJIT metrics from the yjit-bench suite using Ruby 727b2a2999

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 88.0% faster than CRuby 3.4.0dev
  • 4.4% faster than YJIT 3.3.4
On railsbench it is
  • 93.6% 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 82 5 83 50 157 50 163
chunky-png 5 31 5 32 50 15 50 35
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 423 5 427 50 594 50 624
liquid-compile 5 412 5 424 50 549 50 559
liquid-render 5 171 5 168 50 402 50 438
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 186 50 251 50 205
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 155 5 154 50 254 50 262
ruby-lsp 5 156 5 139 50 205 50 246
sequel 5 422 5 421 50 597 50 557
binarytrees 5 84 5 78 50 146 50 152
blurhash 5 82 5 82 50 127 50 144
erubi 5 74 5 149 50 33 50 148
etanni 5 90 5 99 50 52 50 70
fannkuchredux 5 52 5 55 50 99 50 108
fluentd 5 61 5 61 50 23 50 23
graphql 5 86 5 85 50 57 50 56
graphql-native 5 40 5 52 50 10 50 14
lee 5 22 5 22 50 10 50 10
matmul 5 51 5 48 50 88 50 99
nbody 5 248 5 248 50 596 50 716
nqueens 5 119 5 119 50 74 50 558
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 173 5 175 50 616 50 727
protoboeuf-encode 5 178 5 199 50 328 50 809
rack 5 577 5 635 50 952 50 1046
ruby-json 5 84 5 84 50 51 50 51
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 48 50 163 50 162
tinygql 5 37 5 37 50 24 50 26
30k_ifelse 5 28 5 28 50 215 50 192
30k_methods 5 38 5 38 50 479 50 477
cfunc_itself 5 339 5 339 50 1046 50 1135
fib 5 121 5 126 50 900 50 962
getivar 5 208 5 220 50 2270 50 2621
keyword_args 5 105 5 104 50 959 50 1231
object-new 5 320 5 318 50 406 50 387
respond_to 5 137 5 138 50 3256 50 4030
ruby-xor 5 242 5 248 50 803 50 1380
setivar 5 360 5 359 50 2718 50 5703
setivar_object 5 374 5 340 50 772 50 846
setivar_young 5 374 5 343 50 772 50 846
str_concat 5 398 5 380 50 987 50 1201
throw 5 1276 5 1322 50 1735 50 1735

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) 1470594 1293948 213 2351 0 0% 0 0 68.680942
chunky-png (click) 311027 292817 88 1225 16 1% 0 0 36.914956
erubi-rails (click) 1944827 1626959 250 2930 6 0% 0 0 79.352691
hexapdf (click) 1508177 1367607 599 13946 173 1% 0 0 396.328644
liquid-c (click) 495567 450076 119 1852 5 0% 0 0 51.340772
liquid-compile (click) 422821 347473 150 2225 2 0% 0 0 69.819024
liquid-render (click) 620643 518078 136 2474 12 0% 0 0 69.954247
lobsters (click) 8409364 7101017 3214 54778 189 0% 0 0 1915.087357
mail (click) 765669 662391 347 5588 57 1% 0 0 161.18864
psych-load (click) 258435 203198 65 663 17 2% 0 0 20.907915
railsbench (click) 3353237 2868895 1646 16995 50 0% 0 0 493.093821
rubocop (click) 5862157 5055209 2891 52427 110 0% 4 0 1525.027917
ruby-lsp (click) 857116 753270 309 5000 26 0% 0 0 141.127638
sequel (click) 470129 403071 16 133 54 40% 0 0 5.022527
binarytrees (click) 14397 12917 14 126 0 0% 1 0 4.590323
blurhash (click) 58305 50994 31 515 1 0% 0 0 16.585785
erubi (click) 232881 202246 8 113 0 0% 0 0 3.746271
etanni (click) 28736 27536 10 98 0 0% 0 0 3.339084
fannkuchredux (click) 28719 35080 11 307 0 0% 1 0 9.10504
fluentd (click) 349560 314948 10 109 0 0% 0 0 3.919214
graphql (click) 425010 385262 69 695 0 0% 0 0 20.96373
graphql-native (click) 408525 344742 40 270 0 0% 0 0 8.68006
lee (click) 292357 249067 49 848 17 2% 0 0 26.241252
matmul (click) 16519 8883 16 169 4 2% 1 0 5.480573
nbody (click) 19555 23574 14 246 0 0% 1 0 6.644066
nqueens (click) 25836 32550 13 297 4 1% 1 0 8.70338
optcarrot (click) 331857 315992 195 4591 38 0% 1 0 104.856122
protoboeuf (click) 167305 158566 19 1652 0 0% 1 0 47.389513
protoboeuf-encode (click) 238492 234145 21 1291 0 0% 1 0 33.344958
rack (click) 248354 220579 37 424 16 3% 0 0 11.256473
ruby-json (click) 25799 22401 10 188 0 0% 0 0 5.353509
rubykon (click) 144361 141117 140 1606 7 0% 0 0 46.151337
sudoku (click) 48458 36262 10 544 7 1% 0 0 16.30388
tinygql (click) 305683 245255 62 795 20 2% 0 0 22.980344
30k_ifelse (click) 6316834 5792957 9263 56487 0 0% 0 0 1555.938546
30k_methods (click) 2236735 1594956 5782 19373 0 0% 0 0 450.36033
cfunc_itself (click) 8081 6806 9 76 0 0% 0 0 2.450836
fib (click) 5210 5372 7 51 0 0% 0 0 1.902713
getivar (click) 6206 7266 8 78 0 0% 0 0 2.426753
keyword_args (click) 8811 7279 9 74 0 0% 0 0 2.622418
object-new (click) 4638 4712 7 49 1 2% 0 0 1.806134
respond_to (click) 10491 3291 8 109 0 0% 0 0 3.213148
ruby-xor (click) 7466 8064 8 86 2 2% 0 0 2.668671
setivar (click) 5357 5942 8 58 0 0% 0 0 1.99172
setivar_object (click) 5886 6090 8 60 0 0% 0 0 2.172907
setivar_young (click) 6596 6812 9 68 0 0% 0 0 2.348614
str_concat (click) 8820 9220 11 95 3 3% 0 0 3.183702
throw (click) 8558 6849 10 73 0 0% 0 0 2.677429

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.