I am experimenting with an algorithm that I programmed in C ++ using Xcode 7.0. When I compare the performance of the standard LLVM compiler in Xcode with the binary generated when compiling using g ++ (5.2.0), the binary created using LLVM is an order of magnitude (> 10x) faster than the code created using the g ++ compiler.
I use the -o3 code optimization flag for the g ++ compiler as follows:
/usr/local/Cellar/gcc/5.2.0/bin/g++-5 -o3 -fopenmp -DNDEBUG main.cpp \
PattersonInstance.cpp \
... \
-o RROTprog
Compiling g ++ is necessary because the algorithm must be compiled and run on a high-performance computer, where I cannot use the LLVM compiler. Plus, I would like to use Open MP to make the code faster.
All ideas for what causes these speed differences and how they can be resolved are more than welcome.
Thanks in advance for your help!
L
source
share