3 ms·
This post seems quite disingenuous. Clang is way cool and a breath of fresh air, but TFA only mentions compile times and at no point does it mention the charact
by masklinn 16y ago
This post seems quite disingenuous. Clang is way cool and a breath of fresh air, but TFA only mentions compile times and at no point does it mention the characteristics of the output binary (size, performances). It also omits the compilation options (the optimization levels would be a pretty good start).
Because it's fast and pretty small, Clang is probably the best thing you can use during development, but in my experience — no 2.8 yet of course — it produces binaries pretty consistently slower than gcc's and is therefore a worse option for production (and for CI servers and integration of course)
- randombit 16y agoPerformance wise I've seen some good results from Clang SVN in the last few months. Not universally faster (or slower) than GCC or ICC, but I have seen (important, useful) cases where code was 30-50% faster compiled with Clang than anything else I tried. (I also saw cases that had terrible performance, and occasionally miscompiled code, though mostly it was +-10% of GCC). I can't say I understand why anyone would care too much about compilation speed, though - GCC+ccache is about as fast as Clang+ccache, as the primary bottleneck is disk throughput.
- steve19 16y ago> GCC+ccache is about as fast as Clang+ccache, as the primary bottleneck is disk throughput. I often compile code that has not been compiled before. For example when using MacPorts. Never underestimate how much people like speed. I never thought SVN was slow or that I needed speed, until I tried git and realized I could not even consider using something slower.
- avar 16y agoEven if you're compiling code that you work on all the time changing a compile flag can invalidate all your ccache files. Having to wait 10 seconds instead of 30 for the new compile to finish can make a big difference when you want to be able to test changes quickly.
- jbarham 16y ago> Never underestimate how much people like speed. That's one of the main reasons I like Go. It's been explicitly designed to enable fast compilation, and even at this early stage its compilers are very fast.
- barrkel 16y agoWell, if your build speed is measured in milliseconds, and then go back to C++ or even C, you'll learn to really appreciate it.
- goalieca 16y agoIsn't LLVM is where most of the optimization will be done?