Impact of hyperthreading on compiler performance?

Viewed 9384

Say we want to compile a large project (say GCC or the Linux kernel) as fast as possible. Does a CPU with hyperthreading capability (say an Intel Core i7) run the compiler any faster with hyperthreading enabled or disabled? Are there any published benchmarks that test this?

My understanding of hyperthreading is that each core can select instructions from two (or more processes). This usually makes the core more efficient since it's less likely that functional units will be idle. However, there's potential for a performance penalty since processes running on the same core share resources such as cache and may interfere with one another. Whether or not performance actually increases depends on the workload.

So for a compiler workload, does performance increase? If so, by how much?

2 Answers

It all depends on if the compiler is written to be multi-threaded or not. If it is, then definitely hyperthreading speeds things up a bit since then the OS can schedule different parts of the compiler's threads onto different cores. I agree with Ken that compilations generally are more I/O bound than processing intensive, so having a speedy hard-drive would be more of a necessity than a speedy processor with 100's of cores.

Related