[PATCH] D147493: [ELF] Cap parallel::strategy to 8 cores when --threads= is unspecified

Andrew Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 6 02:06:01 PDT 2023


andrewng added a comment.

So out of curiosity, I've done another run of the above example but this time I've built LLVM 16 entirely with MSVC 2019 (MSVC STL & allocator).

| **Threads** | **Time (s)** | **Time gain (%)** | **Cycles (M)** | **Cycles overhead (%)** |
| 1           | 7.695        | -                 | 30,036         | -                       |
| 4           | 3.330        | 57.18             | 39,005         | 28.55                   |
| 8           | 2.611        | 66.42             | 50,462         | 66.31                   |
| 12          | 2.452        | 68.47             | 60,219         | 98.46                   |
| 16          | 2.388        | 69.29             | 74,422         | 145.27                  |
| 20          | 2.407        | 69.05             | 84,579         | 178.75                  |
| 24          | 2.426        | 68.80             | 93,242         | 207.30                  |
|

It's a similar pattern again but overall slower. However, the threading cycles overhead is noticeably less. I suspect that this might be due to the "lock-free" nature of the `rpmalloc` allocator.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D147493



More information about the llvm-commits mailing list