YJIT Benchmarks

Details for Benchmarks at 2024-10-03 04:00:20 UTC

YJIT metrics from the yjit-bench suite using Ruby d40db5cfec

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 74.2% faster than CRuby 3.4.0dev
  • 4.5% faster than YJIT 3.3.4
On railsbench it is
  • 76.9% faster than CRuby 3.4.0dev
  • 1.5% 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 10 56 10 59 10 143 10 152
chunky-png 10 18 10 18 10 36 10 40
erubi-rails 10 10 10 10 10 23 10 22
hexapdf 10 10 10 10 10 10 10 10
liquid-c 10 343 10 352 10 498 10 514
liquid-compile 10 359 10 360 10 503 10 508
liquid-render 10 138 10 135 10 354 10 371
lobsters 10 13 10 13 10 23 10 23
mail 10 158 10 163 10 232 10 235
psych-load 10 10 10 10 10 10 10 10
railsbench 10 10 10 10 10 10 10 10
rubocop 10 135 10 132 10 235 10 241
ruby-lsp 10 127 10 127 10 213 10 228
sequel 10 325 10 326 10 430 10 443
binarytrees 10 51 10 51 10 118 10 114
blurhash 10 62 10 62 10 120 10 147
erubi 10 84 10 102 10 106 10 131
etanni 10 60 10 70 10 69 10 82
fannkuchredux 10 59 10 58 10 123 10 136
fluentd 10 38 10 41 10 42 10 39
graphql 10 61 10 62 10 76 10 76
graphql-native 10 28 10 40 10 33 10 47
lee 10 11 10 12 10 20 10 21
matmul 10 38 10 45 10 72 10 83
nbody 10 203 10 227 10 421 10 520
nqueens 10 112 10 115 10 112 10 473
optcarrot 10 10 10 10 10 10 10 10
protoboeuf 10 159 10 158 10 582 10 647
protoboeuf-encode 10 132 10 166 10 293 10 651
rack 10 460 10 482 10 841 10 934
ruby-json 10 64 10 65 10 76 10 77
rubykon 10 13 10 12 10 37 10 39
sudoku 10 48 10 48 10 139 10 171
tinygql 10 23 10 24 10 51 10 53
30k_ifelse 10 26 10 26 10 230 10 207
30k_methods 10 32 10 32 10 343 10 341
cfunc_itself 10 247 10 254 10 1108 10 1205
fib 10 102 10 98 10 616 10 623
getivar 10 214 10 258 10 1249 10 1763
keyword_args 10 89 10 88 10 729 10 948
object-new 10 230 10 188 10 309 10 239
respond_to 10 91 10 88 10 1786 10 2219
ruby-xor 10 186 10 187 10 497 10 895
setivar 10 348 10 414 10 2320 10 3122
setivar_object 10 216 10 237 10 536 10 573
setivar_young 10 216 10 238 10 529 10 573
str_concat 10 319 10 347 10 657 10 674
throw 10 971 10 843 10 1341 10 1061

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) 1476929 1205844 214 2301 0 0% 0 0 74.196436
chunky-png (click) 294207 266680 82 1090 1 0% 0 0 35.231154
erubi-rails (click) 1918168 1671407 245 2790 8 0% 0 0 83.900392
hexapdf (click) 1389081 1158670 508 12568 40 0% 0 0 397.250774
liquid-c (click) 491132 414230 119 1859 5 0% 0 0 56.756097
liquid-compile (click) 410646 346471 150 2219 2 0% 0 0 75.098218
liquid-render (click) 631725 540712 136 2473 12 0% 0 0 75.278924
lobsters (click) 8062469 6706369 3087 51920 182 0% 0 0 1901.526962
mail (click) 774053 695496 346 5481 16 0% 0 0 175.043914
psych-load (click) 248985 207168 60 615 3 0% 0 0 21.133963
railsbench (click) 3305237 2890858 1631 16671 41 0% 0 0 523.605469
rubocop (click) 5809099 5010649 2892 52167 110 0% 4 0 1686.251803
ruby-lsp (click) 854540 710937 308 4984 26 0% 0 0 154.963463
sequel (click) 458045 399707 15 126 0 0% 0 0 5.079248
binarytrees (click) 9627 8546 8 75 0 0% 0 0 3.333855
blurhash (click) 57136 49713 29 501 0 0% 0 0 18.446591
erubi (click) 250974 227018 9 108 0 0% 0 0 4.214125
etanni (click) 28241 26371 10 86 0 0% 0 0 3.189458
fannkuchredux (click) 24582 31311 6 262 0 0% 0 0 8.92454
fluentd (click) 349154 297495 11 114 0 0% 0 0 4.347891
graphql (click) 402178 351362 70 700 0 0% 0 0 23.623315
graphql-native (click) 394171 319585 41 275 0 0% 0 0 9.87118
lee (click) 246823 232014 33 567 0 0% 0 0 19.491885
matmul (click) 7323 8338 6 76 0 0% 0 0 2.877347
nbody (click) 15428 19810 9 201 0 0% 0 0 6.021913
nqueens (click) 21699 28649 8 252 0 0% 0 0 8.633436
optcarrot (click) 324183 308580 186 4508 34 0% 0 0 113.278499
protoboeuf (click) 163936 155521 15 1615 0 0% 0 0 52.948354
protoboeuf-encode (click) 235128 231105 17 1254 0 0% 0 0 36.623566
rack (click) 236635 198170 36 417 0 0% 0 0 12.216361
ruby-json (click) 27649 24400 11 193 0 0% 0 0 6.276128
rubykon (click) 135726 115935 132 1521 3 0% 0 0 47.803872
sudoku (click) 44908 40454 6 507 0 0% 0 0 17.048962
tinygql (click) 293781 257522 57 743 5 0% 0 0 23.376836
30k_ifelse (click) 6316209 5792190 9262 56478 0 0% 0 0 1817.658624
30k_methods (click) 2236110 1594189 5781 19364 0 0% 0 0 530.637767
cfunc_itself (click) 6912 5554 7 62 0 0% 0 0 2.261368
fib (click) 4585 4605 6 42 0 0% 0 0 1.834002
getivar (click) 5037 6014 6 64 0 0% 0 0 2.077099
keyword_args (click) 8181 6507 8 65 0 0% 0 0 2.594686
object-new (click) 3469 3394 5 35 0 0% 0 0 1.578589
respond_to (click) 9866 2524 7 100 0 0% 0 0 3.38895
ruby-xor (click) 6981 7365 7 77 0 0% 0 0 2.774402
setivar (click) 4188 4690 6 44 0 0% 0 0 1.724137
setivar_object (click) 4717 4838 6 46 0 0% 0 0 1.851276
setivar_young (click) 5427 5560 7 54 0 0% 0 0 2.140947
str_concat (click) 7646 7893 9 81 0 0% 0 0 3.238277
throw (click) 7384 5592 8 59 0 0% 0 0 2.297382

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.