In your experience, which c++ compiler generates the fastest code for 64 bit intel, for a bit-board engine that doesn't use memory management or the std:: library?
I suspect the answer is "it depends", or "it's close", but here are some choices:
1) gcc
2) Microsoft c++
3) clang/llvm
4) Intel c++
c++ compilers
Moderators: hgm, Rebel, chrisw
-
- Posts: 20943
- Joined: Mon Feb 27, 2006 7:30 pm
- Location: Birmingham, AL
Re: c++ compilers
From my testing, Intel is best, but only for actual Intel processors. For AMD there was a bit of trickery going on that made the executable slower, intentionally.jaespo wrote:In your experience, which c++ compiler generates the fastest code for 64 bit intel, for a bit-board engine that doesn't use memory management or the std:: library?
I suspect the answer is "it depends", or "it's close", but here are some choices:
1) gcc
2) Microsoft c++
3) clang/llvm
4) Intel c++
-
- Posts: 2559
- Joined: Fri Nov 26, 2010 2:00 pm
- Location: Czech Republic
- Full name: Martin Sedlak
Re: c++ compilers
I would say intel and gcc are rougly on par but it really depends.
Then clang and last msc, but there are corner cases where a specific compiler can do better than the rest,
but only if you're writing something else than a chess engine.
Intel compiler on AMD:
Intel doesn't use SSE-optimized paths on non-Intel CPUs (the binary can be easily patched though).
I don't know why they still do that because they should have the edge regardless.
For a chess engine this only affects memset and memmove,
so I doubt it will have any noticeable impact unless you copy like crazy.
Then clang and last msc, but there are corner cases where a specific compiler can do better than the rest,
but only if you're writing something else than a chess engine.
Intel compiler on AMD:
Intel doesn't use SSE-optimized paths on non-Intel CPUs (the binary can be easily patched though).
I don't know why they still do that because they should have the edge regardless.
For a chess engine this only affects memset and memmove,
so I doubt it will have any noticeable impact unless you copy like crazy.
-
- Posts: 4367
- Joined: Fri Mar 10, 2006 5:23 am
- Location: http://www.arasanchess.org
Re: c++ compilers
They are pretty much equal, in my experience. Intel C++ used to be better but current versions of gcc and MSVC are giving it decent competition. Intel still has some good auxiliary profiling and performance tools, though.
--Jon
--Jon
-
- Posts: 1600
- Joined: Mon Feb 21, 2011 9:48 am
Re: c++ compilers
Intel is the best,
intrinsic including,
AMD also.
intrinsic including,
AMD also.
-
- Posts: 646
- Joined: Wed Jun 18, 2014 2:30 pm
- Full name: Fahad Syed
Re: c++ compilers
+1jdart wrote:They are pretty much equal, in my experience. Intel C++ used to be better but current versions of gcc and MSVC are giving it decent competition. Intel still has some good auxiliary profiling and performance tools, though.
--Jon
Microsoft VC++ optimizes better than G++ for me.
-
- Posts: 91
- Joined: Wed Mar 26, 2014 4:29 pm
- Location: Buettelborn/Hessen/Germany
Re: c++ compilers
How do you estimate Digital Mars C/C++?