This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Optimization
Doh! I goofed and posted the wrong trace file ... The exceprt from the
file that I posted was from our internal builds, not the 'release'
tree. The release tree for Sparc and Linux, 4.5.3 and 4.7 are both
compiled -O2 -g. We have so many problems with our code that we have
to send it out with the -g flag turned on.
Upon profiling the code, I've found that:
1) 4.5.3 built with gcc-295 and 4.7 built with gcc-32 on Linux run
pretty close to the same speed when compiled -O2 -g. The differences
in speed are neglegable, within a few miliseconds.
2) 4.5.3 built with gcc-295 and 4.7 built with gcc-32 on Solaris
exhibit huge performance differences. 4.7 is about 10x slower than
4.5.3. Again, in the release tree compiled with -O2 -g. I do not see
this problem on Linux, so I'm inclined to believe it is not something
in my code. Also, the Linux tree will compile up -O2 -g
-finline-limit=2750 in about 90 minutes. The Solaris tree takes about
16 hours for the same build.
I'll post the correct compile line at the bottom of this message.
Thanks for the help!
---[ Compile line from 4.7-SPARC using gcc-32 ]---
/opt/mvplocal/gcc-31/bin/g++ -c -fPIC -O2 -g -finline-limit=2750
-mcpu=v8 -mtune=ultrasparc -D__EXTENSIONS__ -DHAS_SYS_IOCTL_H
-DHAS_SYS_FILIO_H -DHAS_STRINGS_H -DHAS_SYS_IOCCOM_H -DHAS_SYS_TIME_H
-DHAS_SYS_WAIT_H -DUNIXHOST -DTHREAD -D_PTHREADS -D_REENTRANT
-D_POSIX_C_SOURCE=199506L -D_G_NO_EXTERN_TEMPLATES -funroll-loops
-pipe -ansi -pedantic -Wimplicit -Wconversion -Wsign-compare
-Wno-long-long -Wreorder -Woverloaded-virtual -Wsign-promo
-Wredundant-decls -DIN_IS_LIBRARY -DDPC_DEBUG
-DNO_ARRAY_BOUNDS_CHECKING -DSVR4 -I../.././include
-I../.././include/libinc -I../.././include/localinc -DXMSTRINGDEFINES
SharedPool.c -o SharedPool.sh
---[ Compile line from 4.5.3-SPARC using gcc-295 ]---
/opt/mvplocal/bin/g++ -c -fPIC -O2 -g -mcpu=v8 -mtune=ultrasparc -DSVR4
-D_POSIX_C_SOURCE=199506L -DTHREAD -D_REENTRANT -D__EXTENSIONS__
-I/usr/dt/include -I/usr/openwin/include -DUNIXHOST -D_PTHREADS -pipe
-D_G_NO_EXTERN_TEMPLATES -funroll-loops -ansi -pedantic -Wimplicit
-Wconversion -Wsign-compare -Wno-long-long -Wreorder
-Woverloaded-virtual -Wsign-promo -DNEWRESULTS -DIN_IS_LIBRARY
-DDPC_DEBUG -I../.././include -I../.././include/libinc
-I../.././include/localinc RemoteCommseg.c -o RemoteCommseg.sh
-brian
Brian D. McGrew { brian@doubledimension.com ||
pacemakertaker@yahoo.com }
--
> YOU! Off my planet!
On Apr 27, 2004, at 7:06 AM, Eljay Love-Jensen wrote:
Hi Brian,
I am unclear: what's the problem?
My first inkling is that your Solaris SPARC platform is x10 faster
than your Linux x86 platform.
My second inkling is... how come you are not performance comparing
optimized code (-O2 or -O3)? Unoptimized code can be notoriously ...
er, umm ... unoptimized.
--Eljay