I tested my codebase with currently favors 'ccache gcc-6 -flto' over 'ccache clang-3.9 -flto' with zapcc.
It's a pure C project.
* Build-time went from 58s to 37s with zapcc. I didn't use zapcc with ccache and shouldn't.
* Run-time went from 371s down to 204s. Almost double speed!
So it's clearly an effect of clang-4 over gcc-6, and not so much zapcc.
Then I crosschecked with clang-4. The run-time is entirely based on clang-4, confirmed.
But the build-time with clang-4 was 44s, still 20% slower than with zapcc.
What I learned:
* ccache is horrible. zapcc is much better.
* clang-4 is fantastic, even if their lto is still too broken to be usable, regarding visibility and inlining.
I found great bugs with new clang-4 warnings.
I had no time yet to use it on C++, where the real advantages come up. On pure C there are just side-effects.
* Build-time went from 58s to 37s with zapcc. I didn't use zapcc with ccache and shouldn't.
* Run-time went from 371s down to 204s. Almost double speed!
So it's clearly an effect of clang-4 over gcc-6, and not so much zapcc.
Then I crosschecked with clang-4. The run-time is entirely based on clang-4, confirmed. But the build-time with clang-4 was 44s, still 20% slower than with zapcc.
What I learned:
* ccache is horrible. zapcc is much better.
* clang-4 is fantastic, even if their lto is still too broken to be usable, regarding visibility and inlining.
I found great bugs with new clang-4 warnings.
I had no time yet to use it on C++, where the real advantages come up. On pure C there are just side-effects.