YJIT Benchmarks

Details for Benchmarks at 2024-09-27 17:10:15 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 74.7% faster than CRuby 3.4.0dev
  • 3.8% faster than YJIT 3.3.4
On railsbench it is
  • 83.2% 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 143 10 154
chunky-png 10 18 10 18 10 36 10 41
erubi-rails 10 10 10 10 10 23 10 22
hexapdf 10 10 10 10 10 10 10 10
liquid-c 10 348 10 352 10 500 10 517
liquid-compile 10 345 10 358 10 517 10 512
liquid-render 10 139 10 134 10 354 10 372
lobsters 10 13 10 13 10 24 10 23
mail 10 161 10 162 10 233 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 234 10 239
ruby-lsp 10 127 10 130 10 216 10 227
sequel 10 323 10 320 10 432 10 439
binarytrees 10 51 10 50 10 118 10 112
blurhash 10 62 10 61 10 120 10 145
erubi 10 84 10 100 10 104 10 130
etanni 10 59 10 67 10 69 10 80
fannkuchredux 10 10 10 10 10 17 10 18
fluentd 10 10 10 10 10 10 10 10
graphql 10 10 10 10 10 10 10 10
graphql-native 10 28 10 40 10 31 10 47
lee 10 11 10 12 10 20 10 21
matmul 10 10 10 10 10 15 10 17
nbody 10 203 10 198 10 421 10 515
nqueens 10 114 10 117 10 113 10 453
optcarrot 10 10 10 10 10 10 10 10
protoboeuf 10 158 10 156 10 536 10 635
protoboeuf-encode 10 133 10 167 10 292 10 655
rack 10 462 10 491 10 820 10 949
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 32
tinygql 10 23 10 24 10 51 10 53
30k_ifelse 10 10 10 10 10 70 10 63
30k_methods 10 10 10 10 10 26 10 25
cfunc_itself 10 247 10 264 10 1108 10 1212
fib 10 102 10 104 10 616 10 623
getivar 10 214 10 230 10 1246 10 1737
keyword_args 10 89 10 89 10 729 10 947
object-new 10 229 10 185 10 308 10 236
respond_to 10 91 10 94 10 1785 10 2217
ruby-xor 10 30 10 32 10 92 10 178
setivar 10 348 10 379 10 2319 10 3102
setivar_object 10 216 10 209 10 536 10 485
setivar_young 10 216 10 210 10 528 10 488
str_concat 10 319 10 332 10 657 10 676
throw 10 970 10 823 10 1348 10 1045

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) 1446299 1228388 214 2301 0 0% 0 0 75.262598
chunky-png (click) 324943 309548 82 1095 1 0% 0 0 36.066151
erubi-rails (click) 1921552 1664796 246 2822 8 0% 0 0 86.717965
hexapdf (click) 1359231 1190236 507 12572 39 0% 0 0 401.137357
liquid-c (click) 487179 493332 119 1859 5 0% 0 0 57.160457
liquid-compile (click) 443159 332978 150 2186 2 0% 0 0 73.495441
liquid-render (click) 599636 529686 136 2473 12 0% 0 0 76.561836
lobsters (click) 8064038 6801412 3086 51966 182 0% 0 0 1935.042144
mail (click) 779433 626018 346 5489 16 0% 0 0 178.360268
psych-load (click) 245715 184396 60 613 3 0% 0 0 21.330534
railsbench (click) 3299404 2819470 1631 16673 41 0% 0 0 532.34142
rubocop (click) 5842686 5139491 2892 52176 110 0% 4 0 1703.825156
ruby-lsp (click) 887727 839192 308 4991 26 0% 0 0 157.718238
sequel (click) 458609 385289 15 118 0 0% 0 0 4.988309
binarytrees (click) 9627 8546 8 75 0 0% 0 0 3.416587
blurhash (click) 57141 49713 29 501 0 0% 0 0 18.926823
erubi (click) 228326 216250 9 108 0 0% 0 0 4.121581
etanni (click) 28241 26371 10 86 0 0% 0 0 3.2418
fannkuchredux (click) 22572 29447 3 240 0 0% 0 0 8.282665
fluentd (click) 366694 309196 3 22 0 0% 0 0 1.1459
graphql (click) 419992 316842 65 651 0 0% 0 0 21.808663
graphql-native (click) 364227 318454 41 275 0 0% 0 0 9.949612
lee (click) 284398 253991 33 567 0 0% 0 0 19.874441
matmul (click) 7323 8338 6 76 0 0% 0 0 2.973835
nbody (click) 15428 19810 9 201 0 0% 0 0 6.064358
nqueens (click) 21699 28649 8 252 0 0% 0 0 8.824961
optcarrot (click) 324183 308580 186 4508 34 0% 0 0 115.020112
protoboeuf (click) 163936 155521 15 1615 0 0% 0 0 53.744901
protoboeuf-encode (click) 235128 231105 17 1254 0 0% 0 0 37.079325
rack (click) 233871 205696 36 417 0 0% 0 0 12.537986
ruby-json (click) 24330 21342 6 160 0 0% 0 0 5.069599
rubykon (click) 140687 120490 135 1573 3 0% 0 0 50.616806
sudoku (click) 44903 40454 6 507 0 0% 0 0 17.443295
tinygql (click) 256635 216869 57 743 5 0% 0 0 24.049822
30k_ifelse (click) 6312890 5789092 9257 56443 0 0% 0 0 1848.802813
30k_methods (click) 2232791 1591091 5776 19329 0 0% 0 0 533.637504
cfunc_itself (click) 6912 5554 7 62 0 0% 0 0 2.318446
fib (click) 4585 4605 6 42 0 0% 0 0 1.864372
getivar (click) 5037 6014 6 64 0 0% 0 0 2.074612
keyword_args (click) 8181 6507 8 65 0 0% 0 0 2.595152
object-new (click) 3469 3394 5 35 0 0% 0 0 1.645593
respond_to (click) 9866 2524 7 100 0 0% 0 0 3.452878
ruby-xor (click) 4619 5278 3 52 0 0% 0 0 1.809546
setivar (click) 4188 4690 6 44 0 0% 0 0 1.693736
setivar_object (click) 4717 4838 6 46 0 0% 0 0 1.962308
setivar_young (click) 5427 5560 7 54 0 0% 0 0 2.195366
str_concat (click) 7646 7893 9 81 0 0% 0 0 3.265555
throw (click) 7384 5592 8 59 0 0% 0 0 2.355191

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.