Jump to content

pjv2500

Member
  • Posts

    1
  • Joined

  • Last visited

Awards

This user doesn't have any awards

pjv2500's Achievements

  1. Sorry for posting on this old thread but I cannot let the LogicalDesign's conclusion be the last post in this thread. I want to fix this as I was also looking for benchmarking around compiling and this thread came up first on my google search. So I want to help other who stumble on this thread and leave better informed. Many new programmers get into programming focus on writing code and it takes a while for them to understand how their code then becomes binary executables or libraries. Is a good thing to know, which I won't fully explain as there's plenty of other resources, but many programmers can probably become relatively successful without knowing. TLDR: Hell YES! More cores can help with compile time. Longer version: Clock speed definitely help compile time. However core count will very likely help compile time even more but there's a couple of condition. The language and compiler you are using (does the compiler support parallel optimization) Compiling time is a problem many people are working on and higher clock speed is one of many ways. At some point (well before this thread even started) there were several walls cpu companies faced with increasing clock speed, to name a few stability, heat, power consumption, laws of physics. So utilizing multiple cores for faster compiling became A method to decrease compiling time. Number for files involved in your projects How do more cores help? For C and C++ projects with multiple files, each file needs to be compile which generates and object file. Once they are all created a linker will more or less combine they parts to create your binary. Hopefully from this oversimplified explanation you can see how the files and be distributed to multiple core (for gcc these are called jobs). And I'm sure other compilers for other languages operate similarly as well including java. If you're compiling from scratch vs recompiling a single file (or few) There's another optimization scheme where the compiler will cache your your previous compiled code (objects) and reuse them for future build if the code for those has not changed. Thus only compile file which has changed. So if you only changed one file or a few, you might not see much benefits from more cores. Whether your IDE is using the compiler option to build in parallel. Most if not all modern compiler will have parallelism optimization but some will need to be implicitly configured to do so. If you're using an IDE there's likely an option for it, but not always. I'm sure there's more points and I might be wrong a few thing but the believe in what I laid out is generally correct. While more cores is generally better you need to consider the cpu as a whole and probably the entire machine. Hope this helps new programmers young and old alike.
×