rbarreira wrote:I was quite impressed with gcc 4.5.0, in my benchmarks its generated code was as fast as with the newest Intel Compiler on Intel CPUs (and of course much faster on AMD CPUs, due to the purposefully bad performance icc has there).
I have 4.5 on my Fedora 14 laptop. I can't get PGO to work. If I try to PGO crafty, and try a run with several single-thread positions, and then one multi-thread position, the PGO output files are always corrupted and the re-compile fails when the compiler complains.
I've given up on it as for me, Intel has always been well over 10% faster since PGO works there...
That's an extremely old GCC version. GCC 4.2.1 was released in July 2007. The current version is 4.5.2, and a release candidate for 4.6 was released just a couple of weeks ago.
Comparing a recent version of clang to an almost four year old version of GCC is quite meaningless, especially when you enable link-time optimization in clang. GCC 4.2.1 does not support link-time optimization, but 4.5 does. It is possible that clang would still come out ahead in a direct comparison to the latest GCC version, but I doubt it.
Hello Tord,
you're right but for mac user we are very closed by the apple choice, and xcode install.
do you know where we can download a gcc version for mac user ?
NaltaP312 wrote:
you're right but for mac user we are very closed by the apple choice, and xcode install.
do you know where we can download a gcc version for mac user ?
The real value of clang right now is not the speed of its generated code, but the quality of its warning and error messages and its static analysis features. Its error messages are so much better than gcc's it's amazing, especially for C++, most especially for templates. I've gotten a lot of use out of it even though gcc and icc both generate faster binaries.
$ clang -O3 -flto olithink.c -o OliThink
olithink.c:1180:50: warning: use of unary operator that may be intended as compound assignment (-=)
if (*sf == 1 && !(pieceb[PAWN] & colorb[c])) mn =- 200; //No mating material
^~
$ clang -O3 -flto olithink.c -o OliThink
olithink.c:1180:50: warning: use of unary operator that may be intended as compound assignment (-=)
if (*sf == 1 && !(pieceb[PAWN] & colorb[c])) mn =- 200; //No mating material
^~
Should that be mn = -200; or mn -= 200;?
Good catch! It's almost surely a bug, although I doubt it has a noticeable effect on playing strength. (What was written probably works about as well as what was meant; it wouldn't be crazy just to "fix" the whitespace.) Have you contacted Oliver?
I'm amazed that this error message is still useful so long after 1976. (Dennis Ritchie wrote that 1976 was when the ill-chosen "=+" and "=-" operators were renamed.)
$ clang -O3 -flto olithink.c -o OliThink
olithink.c:1180:50: warning: use of unary operator that may be intended as compound assignment (-=)
if (*sf == 1 && !(pieceb[PAWN] & colorb[c])) mn =- 200; //No mating material
^~
Should that be mn = -200; or mn -= 200;?
Good catch! It's almost surely a bug, although I doubt it has a noticeable effect on playing strength. (What was written probably works about as well as what was meant; it wouldn't be crazy just to "fix" the whitespace.) Have you contacted Oliver?
I'm amazed that this error message is still useful so long after 1976. (Dennis Ritchie wrote that 1976 was when the ill-chosen "=+" and "=-" operators were renamed.)