3 ms·
Just as a quick comment—the difference in compile times between Clang and GCC is fairly significant. I regularly see much shorter compile times on macOS develop
by klodolph 6y ago
Just as a quick comment—the difference in compile times between Clang and GCC is fairly significant. I regularly see much shorter compile times on macOS development systems and after trying Clang on Linux, the gap narrows significantly.
My most recent experience was with building GCC for cross-compiling. I had been doing work on Linux and spun up a cloud VM instance to do the compiling there with tons of CPU. Later, I wanted a Mac build environment set up, and when I compiled GCC on macOS with Clang, it was much faster to build. I went back to my Linux system and tried compiling GCC using Clang there, and got the same result.
Clang is fast. Just saying.
- mhh__ 6y agoPhoronix currently have GCC faster than Clang at compiling the Linux kernel. There was a big thread on it recently
- klodolph 6y agoSure… it does depend on the code base. My experience was with GCC 10.2 (both as code base and as compiler).
- brmgb 6y agoAt the same time, the Linux kernel uses so many GCC specific extensions to C that an unpatched Clang couldn't even compile it until 2019. It is not in any way a typical program.
- phs318u 6y agoBut he does the same build on his 2019 Mac laptop, which presumably also uses Clang. The M1 blows it away.