[cfe-dev] Chrome/mac is all-clang, all-the-time

Martin Whitaker mailing-list at martin-whitaker.me.uk
Tue Nov 1 15:32:58 PDT 2011


Matthieu Monrocq wrote:
> Another interesting point though, for the switch, is the performance of the
> resulting binary. Development is one thing, and we have a lot of tools at
> our disposal to help out: compiling with both Clang and gcc with warnings
> on certainly help catch a lot of errors, static analysis is quite useful as
> well, debug builds etc... However when pushing software to a server, we
> still want to heck out as much speed and as few memory as we can from it.
>
> As far as I know, gcc still has the lead here (but then the only serious
> benchmarks I saw were from phoronix, and it was a while ago). I seem to
> remember that LLVM was more adept for numerical computation, but it's of
> little interest to me (and my company). If someone had accurate figures
> Clang 3.0 / gcc 4.7, it would be interesting to see how it falls out now.
>
Not an exhaustive test I know, but a month or two ago I did a comparison 
between clang ToT and gcc 4.5.2 on my home machine (AMD Athlon 7750 dual-core, 
Linux) on an application where I'm keen to get the best possible performance 
(a Verilog simulator). Compile times were almost the same (clang had a very 
slight edge), but for run times, the clang generated binary was approximately 
10% slower.

Martin



More information about the cfe-dev mailing list