[cfe-dev] Some clang benchmarking on Windows

Francois Pichet pichet2000 at gmail.com
Sun Jun 24 06:34:46 PDT 2012


On Wed, Oct 13, 2010 at 11:54 AM, Francois Pichet <pichet2000 at gmail.com> wrote:
> For people who are curious, I benchmarked MSVC 2008 and 2010 cl.exe
> compiler on the same file. Again I used -c (-fsyntax-only)
>
> cl.exe 2008 speed =>   5.6 sec
> cl.exe 2010 speed =>   5.7 sec
> clang.exe trunk     =>   5.4 sec
>
> clang is slightly faster than MSVC at parsing the non templated Visual
> Studio header files.
> I ran the test many times on both clang and cl to make sure all header
> files were in the cache somewhere because the first time you run it,
> your get slower result.

FYI, 18 months later.. clang is no longer faster than cl.exe, it's a draw!!
I am using a file test.cpp that just include all the Windows/MSVC SDK headers.

-fsyntax-only parsing benchmarking:

> cl.exe 2010 speed =>   7.2 sec
> clang.exe trunk     =>   7.2 sec

I ran the test many many times and I always get 7.2 secs. Strangely
clang.exe and cl.exe (MSVC) take almost exactly the same time to parse
the test file.

(The reason the test went from 5.x sec to 7.2 sec is because it now
includes a lot more .h files).




More information about the cfe-dev mailing list