[cfe-users] Question casually profiling Clang vs GCC

Kim Gräsman via cfe-users cfe-users at lists.llvm.org
Fri Aug 3 07:36:00 PDT 2018


Hi Florian,

Precompiled headers are supposed to live side-by-side with their
source headers, according to:
https://gcc.gnu.org/onlinedocs/gcc/Precompiled-Headers.html

So you can probably do something like `find /usr/include -name
"*.gch"` to see if there are GCC precompiled headers available.

(Not sure where you should be searching in Gentoo to catch all
headers, but you should be able to figure it out)

Cheers,
- Kim

On Wed, Aug 1, 2018 at 11:28 PM, Florian Berger via cfe-users
<cfe-users at lists.llvm.org> wrote:
> On 01.08.2018 16:29, Jonas Toth via cfe-users wrote:
>>
>> very interesting. My experience with normal compilation is, that clang
>> is faster.
>
> Here's the data. It's from a single run each, so it's nowhere near a
> statistically sound sample.
>
> Package                      GCC         Clang       Difference
>
> dev-lang/python-2.7.15        2:31,640s   3:36,891s  +43%
> app-arch/unzip-6.0_p21-r2     0:07,859s   0:10,094s  +28%
> media-libs/opus-1.2.1         0:34,218s   0:46,750s  +37%
> mail-mta/exim-4.91-r2         0:39,779s   0:54,672s  +37%
> www-servers/nginx-1.12.2-r1   0:43,378s   1:03,537s  +46%
> dev-db/postgresql-10.3        4:03,518s   6:14,859s  +54%
> media-gfx/inkscape-0.92.2    28:21,146s  34:52,015s  +23%
>
>
>> Could it be, that there are some precompiled headers or similar present
>> on the system, that GCC utilizes?
>
> That is possible. Where and how would I check that?
>
> Cheers,
>     Florian
>
>
> _______________________________________________
> cfe-users mailing list
> cfe-users at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users



More information about the cfe-users mailing list