Browse Source

Add weight to the gcc parallel tasks

Tasks are not parallelized until their total "cost" exceeds 10k.
The weight of a vector is the length of the vector. The weight of
the task is increased by 5% for each additional task added (eg
for_each), but for compilation phases, because the step itself is
quite expensive, it is worth increasing the weight to force maximum
parallelism.
vs2017
Nipunn Koorapati 8 years ago
parent
commit
902a4a27de
  1. 2
      src/lib.rs

2
src/lib.rs

@ -367,7 +367,7 @@ impl Config {
}
drop(rayon::initialize(cfg));
objs.par_iter().for_each(|&(ref src, ref dst)| {
objs.par_iter().weight_max().for_each(|&(ref src, ref dst)| {
self.compile_object(src, dst)
})
}

Loading…
Cancel
Save