[PATCH] D115078: Split the locking of the queue and the threads vector in the ThreadPool implementation

Mehdi AMINI via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 3 20:08:46 PST 2021


mehdi_amini marked an inline comment as done.
mehdi_amini added inline comments.


================
Comment at: llvm/include/llvm/Support/ThreadPool.h:45
+      : Strategy(S), MaxThreadCount(S.compute_thread_count()) {
+    Threads.reserve(MaxThreadCount);
+  }
----------------
Benoit wrote:
> is the performance benefit of avoiding some small mallocs worth the line of code?
Probably not, happy to leave it out, it does not really belong to this patch anyway I think.



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D115078/new/

https://reviews.llvm.org/D115078



More information about the llvm-commits mailing list