YJIT Benchmarks

Details for Benchmarks at 2024-09-24 09:48:26 UTC

YJIT metrics from the yjit-bench suite using Ruby 5228d349d9

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 74.0% faster than CRuby 3.4.0dev
  • 3.1% faster than YJIT 3.3.4
On railsbench it is
  • 77.4% faster than CRuby 3.4.0dev
  • 1.8% slower 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 10 57 10 59 10 145 10 152
chunky-png 10 18 10 18 10 36 10 40
erubi-rails 10 10 10 10 10 22 10 22
hexapdf 10 10 10 10 10 10 10 10
liquid-c 10 348 10 352 10 489 10 510
liquid-compile 10 346 10 347 10 522 10 504
liquid-render 10 139 10 135 10 352 10 361
lobsters 10 13 10 13 10 24 10 23
mail 10 162 10 146 10 232 10 236
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 238
ruby-lsp 10 127 10 131 10 216 10 224
sequel 10 316 10 323 10 424 10 440
binarytrees 10 51 10 52 10 118 10 114
blurhash 10 63 10 62 10 120 10 144
erubi 10 84 10 101 10 105 10 130
etanni 10 60 10 69 10 69 10 80
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 40 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 223 10 421 10 535
nqueens 10 113 10 115 10 113 10 480
optcarrot 10 10 10 10 10 10 10 10
protoboeuf 10 159 10 155 10 582 10 634
protoboeuf-encode 10 133 10 171 10 293 10 658
rack 10 456 10 473 10 836 10 896
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 36
tinygql 10 23 10 24 10 51 10 53
30k_ifelse 10 10 10 10 10 71 10 62
30k_methods 10 10 10 10 10 26 10 26
cfunc_itself 10 250 10 253 10 1107 10 1212
fib 10 102 10 102 10 616 10 623
getivar 10 215 10 246 10 1252 10 1754
keyword_args 10 89 10 91 10 729 10 947
object-new 10 228 10 189 10 308 10 235
respond_to 10 89 10 92 10 1785 10 2218
ruby-xor 10 30 10 30 10 92 10 168
setivar 10 348 10 404 10 2319 10 3117
setivar_object 10 229 10 229 10 536 10 485
setivar_young 10 216 10 229 10 528 10 480
str_concat 10 320 10 347 10 658 10 678
throw 10 971 10 814 10 1348 10 1037

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) 1454871 1235561 214 2301 0 0% 0 0 80.816383
chunky-png (click) 319929 272448 82 1090 1 0% 0 0 37.104622
erubi-rails (click) 1918511 1631004 245 2821 8 0% 0 0 90.161641
hexapdf (click) 1368487 1206084 507 12571 40 0% 0 0 431.930131
liquid-c (click) 493018 448771 119 1861 5 0% 0 0 61.144564
liquid-compile (click) 414518 338444 150 2219 2 0% 0 0 79.938161
liquid-render (click) 608908 578343 136 2473 12 0% 0 0 81.185326
lobsters (click) 8062460 6765528 3087 51828 182 0% 0 0 2071.283971
mail (click) 740505 650376 346 5489 16 0% 0 0 187.548427
psych-load (click) 255375 240027 60 615 3 0% 0 0 22.316822
railsbench (click) 3301246 2844238 1631 16663 41 0% 0 0 558.727534
rubocop (click) 5838928 5095155 2892 52176 110 0% 4 0 1852.190736
ruby-lsp (click) 852657 733396 308 4992 26 0% 0 0 169.85837
sequel (click) 456389 401009 15 124 0 0% 0 0 5.114776
binarytrees (click) 9721 8668 8 76 0 0% 0 0 3.542907
blurhash (click) 57136 49713 29 501 0 0% 0 0 19.774729
erubi (click) 251206 243592 9 108 0 0% 0 0 4.235306
etanni (click) 24711 23355 10 87 0 0% 0 0 3.375898
fannkuchredux (click) 22572 29447 3 240 0 0% 0 0 9.261253
fluentd (click) 341200 320220 3 22 0 0% 0 0 1.021677
graphql (click) 397431 379394 65 651 0 0% 0 0 22.75336
graphql-native (click) 394825 319985 41 275 0 0% 0 0 10.258207
lee (click) 245151 205503 33 567 0 0% 0 0 20.704225
matmul (click) 7323 8338 6 76 0 0% 0 0 2.994611
nbody (click) 15428 19810 9 201 0 0% 0 0 6.315965
nqueens (click) 21699 28649 8 252 0 0% 0 0 9.552257
optcarrot (click) 324183 308580 186 4508 34 0% 0 0 122.105758
protoboeuf (click) 163936 155521 15 1615 0 0% 0 0 56.947369
protoboeuf-encode (click) 235128 231105 17 1254 0 0% 0 0 38.612157
rack (click) 264488 233152 36 422 0 0% 0 0 13.195706
ruby-json (click) 21927 18803 6 158 0 0% 0 0 5.132263
rubykon (click) 141083 120769 135 1575 3 0% 0 0 52.813505
sudoku (click) 44903 40454 6 507 0 0% 0 0 18.484733
tinygql (click) 294013 265924 57 743 5 0% 0 0 24.400939
30k_ifelse (click) 6312890 5789092 9257 56443 0 0% 0 0 1905.203154
30k_methods (click) 2232791 1591091 5776 19329 0 0% 0 0 543.231351
cfunc_itself (click) 6912 5554 7 62 0 0% 0 0 2.248075
fib (click) 4585 4605 6 42 0 0% 0 0 1.847529
getivar (click) 5037 6014 6 64 0 0% 0 0 2.108437
keyword_args (click) 8181 6507 8 65 0 0% 0 0 2.615648
object-new (click) 3469 3394 5 35 0 0% 0 0 1.621693
respond_to (click) 9866 2524 7 100 0 0% 0 0 3.563193
ruby-xor (click) 4619 5278 3 52 0 0% 0 0 1.840612
setivar (click) 4188 4690 6 44 0 0% 0 0 1.687825
setivar_object (click) 4717 4838 6 46 0 0% 0 0 1.882173
setivar_young (click) 5427 5560 7 54 0 0% 0 0 2.148735
str_concat (click) 7646 7893 9 81 0 0% 0 0 3.281979
throw (click) 7384 5592 8 59 0 0% 0 0 2.377631

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.