[PATCH] D38266: Parallelize string merging.

Rafael Avila de Espindola via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 28 15:38:29 PDT 2017


> +  // Parallelism. Changing this number causes benign changes in the
> +  // order of output section pieces. For build reproducibility, we
> +  // always use the same number.
> +  static constexpr size_t NumShards = 8;

One idea that might allow using a variable number of shards:

Sort the strings once they are know to be unique. The sort order can be
based on the hash and look at the string itself only if two hashes are
identical, so it shouldn't be too slow.

Cheers,
Rafael


More information about the llvm-commits mailing list