YJIT Benchmarks

Details for Benchmarks at 2024-11-29 03:48:27 UTC

YJIT metrics from the yjit-bench suite using Ruby f9d0bc22f5.

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 90.6% faster than CRuby 3.4.0dev
  • 5.4% faster than YJIT 3.3.6
On railsbench it is
  • 95.5% faster than CRuby 3.4.0dev
  • 2.7% faster than YJIT 3.3.6
x86_64 runtime: 3 hours, 44 minutes
aarch64 runtime: 3 hours, 12 minutes

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.6 warmups CRuby 3.3.6 iters CRuby 3.4.0dev warmups CRuby 3.4.0dev iters YJIT 3.3.6 warmups YJIT 3.3.6 iters YJIT 3.4.0dev warmups YJIT 3.4.0dev iters
activerecord 5 82 5 81 50 157 50 164
chunky-png 5 32 5 33 50 15 50 34
erubi-rails 5 16 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 413 5 427 50 593 50 633
liquid-compile 5 407 5 409 50 540 50 557
liquid-render 5 171 5 169 50 405 50 423
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 193 50 251 50 250
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 155 5 155 50 249 50 263
ruby-lsp 5 155 5 157 50 241 50 263
sequel 5 427 5 406 50 600 50 585
binarytrees 5 83 5 82 50 144 50 141
blurhash 5 82 5 83 50 127 50 144
erubi 5 118 5 146 50 100 50 147
etanni 5 91 5 98 50 54 50 71
fannkuchredux 5 52 5 55 50 101 50 106
fluentd 5 63 5 64 50 25 50 22
graphql 5 85 5 86 50 57 50 57
graphql-native 5 40 5 52 50 10 50 16
lee 5 23 5 23 50 10 50 10
matmul 5 51 5 51 50 84 50 97
nbody 5 248 5 248 50 577 50 713
nqueens 5 120 5 121 50 75 50 563
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 173 5 173 50 620 50 736
protoboeuf-encode 5 179 5 199 50 329 50 819
rack 5 576 5 634 50 945 50 1069
ruby-json 5 83 5 84 50 50 50 50
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 49 50 164 50 161
tinygql 5 35 5 37 50 22 50 26
30k_ifelse 5 28 5 28 50 215 50 193
30k_methods 5 38 5 38 50 484 50 472
cfunc_itself 5 341 5 330 50 1046 50 1135
fib 5 126 5 128 50 900 50 963
getivar 5 207 5 219 50 2267 50 2627
keyword_args 5 105 5 103 50 959 50 1231
object-new 5 321 5 310 50 404 50 378
respond_to 5 133 5 138 50 3254 50 4036
ruby-xor 5 242 5 247 50 803 50 1375
setivar 5 358 5 358 50 3125 50 5703
setivar_object 5 374 5 341 50 781 50 840
setivar_young 5 374 5 344 50 767 50 853
str_concat 5 402 5 393 50 962 50 1204
throw 5 1258 5 1311 50 1742 50 1707

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) 1489225 1261700 213 2351 0 0% 0 0 73.010836
chunky-png (click) 311844 286671 88 1225 17 1% 0 0 36.510313
erubi-rails (click) 1988730 1689842 264 3064 19 0% 0 0 83.505869
hexapdf (click) 1536520 1321645 599 13991 174 1% 0 0 399.345567
liquid-c (click) 493337 433862 118 1843 5 0% 0 0 50.858317
liquid-compile (click) 418881 346838 150 2230 2 0% 0 0 69.098774
liquid-render (click) 635847 554269 135 2468 12 0% 0 0 68.98226
lobsters (click) 8420613 7087794 3214 54852 189 0% 0 0 1867.272006
mail (click) 791026 725710 347 5588 57 1% 0 0 160.684529
psych-load (click) 289504 254841 65 663 17 2% 0 0 20.634536
railsbench (click) 3364283 2938741 1646 17067 52 0% 0 0 491.199489
rubocop (click) 5866392 5059116 2891 52439 110 0% 4 0 1520.427237
ruby-lsp (click) 861488 718572 309 5005 26 0% 0 0 142.531955
sequel (click) 478318 429790 16 118 56 47% 0 0 4.131585
binarytrees (click) 14397 12917 14 126 0 0% 1 0 4.577406
blurhash (click) 58305 50994 31 515 1 0% 0 0 16.600901
erubi (click) 259717 212094 8 113 0 0% 0 0 3.843737
etanni (click) 32243 30528 9 94 0 0% 0 0 3.232764
fannkuchredux (click) 28719 35080 11 307 0 0% 1 0 9.1753
fluentd (click) 352922 286975 10 109 0 0% 0 0 3.904426
graphql (click) 407554 368671 69 695 0 0% 0 0 21.78371
graphql-native (click) 376877 317525 40 270 0 0% 0 0 9.126666
lee (click) 288008 239654 49 848 17 2% 0 0 26.22354
matmul (click) 16519 8883 16 169 4 2% 1 0 5.44207
nbody (click) 16058 20577 10 210 0 0% 0 0 5.572073
nqueens (click) 22324 29548 9 261 4 1% 0 0 7.604047
optcarrot (click) 331857 315992 195 4591 38 0% 1 0 104.979074
protoboeuf (click) 163798 155564 15 1616 0 0% 0 0 46.070034
protoboeuf-encode (click) 238492 234145 21 1291 0 0% 1 0 33.458892
rack (click) 270945 224272 37 424 16 3% 0 0 11.332341
ruby-json (click) 24665 21345 10 187 0 0% 0 0 5.426394
rubykon (click) 142727 123210 140 1592 7 0% 0 0 45.500262
sudoku (click) 48458 36262 10 544 7 1% 0 0 16.152191
tinygql (click) 304473 268909 62 795 20 2% 0 0 22.87903
30k_ifelse (click) 6316834 5792957 9263 56487 0 0% 0 0 1559.202404
30k_methods (click) 2236735 1594956 5782 19373 0 0% 0 0 453.042681
cfunc_itself (click) 8081 6806 9 76 0 0% 0 0 2.471957
fib (click) 5210 5372 7 51 0 0% 0 0 1.963357
getivar (click) 6206 7266 8 78 0 0% 0 0 2.373557
keyword_args (click) 12318 10276 13 110 0 0% 1 0 3.658605
object-new (click) 4638 4712 7 49 1 2% 0 0 1.783707
respond_to (click) 13998 6288 12 145 0 0% 1 0 4.271333
ruby-xor (click) 11004 11151 12 122 2 1% 1 0 3.740037
setivar (click) 8869 8944 12 94 0 0% 1 0 3.264876
setivar_object (click) 5886 6090 8 60 0 0% 0 0 2.209617
setivar_young (click) 6596 6812 9 68 0 0% 0 0 2.387495
str_concat (click) 12327 12217 15 131 3 2% 1 0 4.258051
throw (click) 12065 9846 14 109 0 0% 1 0 3.662841

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.