YJIT Benchmarks

Details for Benchmarks at 2024-09-21 18:00:23 UTC

YJIT metrics from the yjit-bench suite using Ruby 9f574fa12f

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 72.9% faster than CRuby 3.4.0dev
  • 3.0% faster than YJIT 3.3.4
On railsbench it is
  • 72.5% faster than CRuby 3.4.0dev
  • the same speed as 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 10 56 10 58 10 141 10 149
chunky-png 10 18 10 17 10 36 10 39
erubi-rails 10 10 10 10 10 22 10 22
hexapdf 10 10 10 10 10 10 10 10
liquid-c 10 348 10 347 10 501 10 508
liquid-compile 10 345 10 347 10 501 10 501
liquid-render 10 137 10 135 10 354 10 364
lobsters 10 13 10 13 10 24 10 23
mail 10 161 10 162 10 238 10 231
psych-load 10 10 10 10 10 10 10 10
railsbench 10 10 10 10 10 10 10 10
rubocop 10 135 10 134 10 237 10 239
ruby-lsp 10 128 10 131 10 211 10 226
sequel 10 320 10 315 10 429 10 436
binarytrees 10 51 10 52 10 118 10 114
blurhash 10 62 10 62 10 120 10 148
erubi 10 84 10 101 10 105 10 128
etanni 10 60 10 68 10 69 10 79
fannkuchredux 10 10 10 10 10 17 10 20
fluentd 10 10 10 10 10 10 10 10
graphql 10 10 10 10 10 10 10 10
graphql-native 10 29 10 41 10 33 10 48
lee 10 11 10 12 10 19 10 21
matmul 10 10 10 10 10 15 10 19
nbody 10 203 10 220 10 421 10 511
nqueens 10 113 10 113 10 113 10 468
optcarrot 10 10 10 10 10 10 10 10
protoboeuf 10 158 10 154 10 582 10 636
protoboeuf-encode 10 132 10 167 10 293 10 656
rack 10 461 10 491 10 843 10 905
ruby-json 10 10 10 10 10 10 10 10
rubykon 10 10 10 10 10 10 10 10
sudoku 10 10 10 10 10 28 10 35
tinygql 10 23 10 23 10 51 10 51
30k_ifelse 10 10 10 10 10 71 10 62
30k_methods 10 10 10 10 10 26 10 25
cfunc_itself 10 249 10 251 10 1108 10 1212
fib 10 102 10 102 10 616 10 623
getivar 10 214 10 246 10 1248 10 1754
keyword_args 10 90 10 88 10 729 10 949
object-new 10 228 10 193 10 309 10 243
respond_to 10 91 10 91 10 1784 10 2218
ruby-xor 10 30 10 29 10 92 10 175
setivar 10 348 10 401 10 2319 10 3116
setivar_object 10 215 10 226 10 536 10 484
setivar_young 10 216 10 227 10 528 10 477
str_concat 10 319 10 339 10 657 10 712
throw 10 966 10 813 10 1342 10 1044

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) 1448803 1219081 214 2301 0 0% 0 0 80.909354
chunky-png (click) 297960 253358 82 1090 1 0% 0 0 37.330653
erubi-rails (click) 1927647 1627735 245 2828 8 0% 0 0 90.808423
hexapdf (click) 1358077 1100345 507 12571 36 0% 0 0 433.668393
liquid-c (click) 491990 408402 119 1859 5 0% 0 0 60.235012
liquid-compile (click) 417497 360245 150 2212 2 0% 0 0 78.986405
liquid-render (click) 598534 488912 136 2473 12 0% 0 0 81.471757
lobsters (click) 8047025 6753411 3087 51733 182 0% 0 0 2066.15257
mail (click) 779026 650233 346 5489 16 0% 0 0 187.70911
psych-load (click) 246957 226671 60 613 3 0% 0 0 22.164537
railsbench (click) 3337864 2810205 1631 16685 41 0% 0 0 561.803367
rubocop (click) 5802747 4916506 2892 52176 110 0% 4 0 1847.003588
ruby-lsp (click) 848368 694997 308 4987 26 0% 0 0 170.876567
sequel (click) 467982 400954 15 125 0 0% 0 0 5.304961
binarytrees (click) 9627 8546 8 75 0 0% 0 0 3.445556
blurhash (click) 57136 49713 29 501 0 0% 0 0 19.778352
erubi (click) 212551 185237 9 108 0 0% 0 0 4.147751
etanni (click) 28241 26371 10 86 0 0% 0 0 3.342479
fannkuchredux (click) 22572 29447 3 240 0 0% 0 0 9.205942
fluentd (click) 367878 293975 3 22 0 0% 0 0 1.119984
graphql (click) 397844 355019 65 651 0 0% 0 0 22.591978
graphql-native (click) 358311 298303 41 275 0 0% 0 0 10.300222
lee (click) 284398 253991 33 567 0 0% 0 0 20.824096
matmul (click) 7323 8338 6 76 0 0% 0 0 3.055125
nbody (click) 15428 19810 9 201 0 0% 0 0 6.370136
nqueens (click) 21699 28649 8 252 0 0% 0 0 9.632388
optcarrot (click) 324183 308580 186 4508 34 0% 0 0 121.38283
protoboeuf (click) 163936 155521 15 1615 0 0% 0 0 56.800433
protoboeuf-encode (click) 235128 231105 17 1254 0 0% 0 0 38.697823
rack (click) 225449 215366 36 417 0 0% 0 0 12.963868
ruby-json (click) 24330 21342 6 160 0 0% 0 0 5.266063
rubykon (click) 140687 120490 135 1573 3 0% 0 0 52.787209
sudoku (click) 44903 40454 6 507 0 0% 0 0 18.743186
tinygql (click) 271785 246397 57 743 5 0% 0 0 24.655197
30k_ifelse (click) 6312890 5789092 9257 56443 0 0% 0 0 1904.912118
30k_methods (click) 2232791 1591091 5776 19329 0 0% 0 0 541.994666
cfunc_itself (click) 6912 5554 7 62 0 0% 0 0 2.318322
fib (click) 4585 4605 6 42 0 0% 0 0 1.859262
getivar (click) 5037 6014 6 64 0 0% 0 0 2.165777
keyword_args (click) 8181 6507 8 65 0 0% 0 0 2.624797
object-new (click) 3469 3394 5 35 0 0% 0 0 1.598423
respond_to (click) 9866 2524 7 100 0 0% 0 0 3.548201
ruby-xor (click) 4619 5278 3 52 0 0% 0 0 1.830604
setivar (click) 4188 4690 6 44 0 0% 0 0 1.708681
setivar_object (click) 4717 4838 6 46 0 0% 0 0 1.882111
setivar_young (click) 5427 5560 7 54 0 0% 0 0 2.13101
str_concat (click) 7646 7893 9 81 0 0% 0 0 3.298492
throw (click) 7384 5592 8 59 0 0% 0 0 2.356419

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.