So, I tested it with my engine (bitboard based, 64-bit compiles, perft 6).
g++-4.2: NPS = 8079kNPS (-DNDEBUG -Wall -mcpu=G5 -mtune=G5 -O3 -fast)
g++-4.2: NPS = 7335kNPS (-DNDEBUG -Wall -arch ppc64 -O3)
llvm-g++: NPS = 6717kNPS (-DNDEBUG -Wall -arch ppc64 -O3)
So, llvm-g++ is a tad slower than g++-4.2 on 64-bit, and a good bit slower that g++4.2 using CPU specific optimizations. Using 32-bit compiles they were pretty much the same:
g++-4.2: NPS = 5214kNPS (-DNDEBUG -Wall -arch ppc -O3)
llvm-g++: NPS = 4987kNPS (-DNDEBUG -Wall -arch ppc -O3)
llvm-g++: NPS = 6032kNPS (-DNDEBUG -Wall -arch ppc -O4)
With Link-Time Optimization (use -O4 command-line option) llvm-g++ even smoked g++ on 32-bit. Unfortunately, I couldn't get Link-Time Optimization to work on 64-bit, I always got the error (invalid .machine argument: ppc970).
LLVM gcc
Moderator: Ras
Re: LLVM gcc
From the Release notes
These are GCC 4.2 features that are not available in LLVM-GCC 4.2:
Profile-guided optimization
Auto vectorization
Stack canaries
OpenMP
Inline assembly that uses x87 registers
Generating debug information for optimized code
-
- Posts: 397
- Joined: Sun Oct 29, 2006 4:38 am
- Location: Schenectady, NY
Re: LLVM gcc
The lack of PGO breaks it for serious chess engine use. I like to play around with "little languages" so LLVM still seems good.krazyken wrote:From the Release notes
These are GCC 4.2 features that are not available in LLVM-GCC 4.2:
Profile-guided optimization
Auto vectorization
Stack canaries
OpenMP
Inline assembly that uses x87 registers
Generating debug information for optimized code
Thanks for the information, Kenny.
Ron