This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Benchmarking gcc 3.0pre/gcc 2.95.3/gcc 2.7.2/MSVC 6
- To: <gcc at gcc dot gnu dot org>
- Subject: Benchmarking gcc 3.0pre/gcc 2.95.3/gcc 2.7.2/MSVC 6
- From: Gian-Carlo Pascutto <gcp at sjeng dot org>
- Date: Sat, 9 Jun 2001 00:46:20 +0200 (MEST)
Hi all,
I ran a series of benchmarks with various versions of
gcc on my chessprogram. There were three interesting
results:
At maximum optimizations, Microsoft Visual C++ 6 is
faster for every function benchmarked
For the default -O2 level, gcc 2.7.2.3 generates significantly
faster code than gcc 2.95.3 and gcc 3.0pre.
I use a single source file which includes all others
to try to get better optimizations. This works for
MSVC 6 and gcc 2.95.3, but fails with gcc 3.
The full benchmark output is included below. The benchmarks
repeatedly calls the the most timecritical functions.
If you want to test for yourself, the source code for this program
is freely available at http://www.sjeng.org, the benchmark code
is built in.
If someone is interested in comparing GCC code to the MSVC
code, please contact me, I can email you a full dump of
the assembly output from MSVC with corresponding source lines.
I hope this is usefull for someone. I remember people stating on
this list that if there were programs where MSVC was faster than
GCC they wanted to know about it. Well, here is one :)
--
Reading specs from /oldreis2/gcc3/lib/gcc-lib/i686-pc-linux-gnu/3.0/specs
Configured with: ../gcc-20010604/configure --prefix=/oldreis2/gcc3 --enable-shared --with-gnu-as --with-gnu-ld --enable-version-specific-runtime-libs
Thread model: single
gcc version 3.0 20010604 (prerelease)
best options
make CC='/oldreis2/gcc3/bin/gcc' 'CFLAGS=-O9 -march=athlon -funroll-all-loops -fomit-frame-pointer -fno-gcse -fstrict-aliasing -fssa'
Sjeng: speed
Movegen speed: 454132/s
Make+unmake speed: 6281407/s
Movecycle speed: 3813882/s
Eval speed: 541711/s
-O2
Sjeng: speed
Movegen speed: 353356/s
Make+unmake speed: 6640106/s
Movecycle speed: 3773584/s
Eval speed: 412371/s
cat all files together + best options
/tmp/ccI2IjZM.o: In function `__FRAME_BEGIN__':
/tmp/ccI2IjZM.o(.eh_frame+0x11): undefined reference to `__gxx_personality_v0'
Reading specs from /usr/lib/gcc-lib/i486-pc-linux-gnu/2.95.3/specs
gcc version 2.95.3 20010315 (release)
cat all files together + best options
make 'CFLAGS=-O9 -march=pentiumpro -funroll-all-loops -fomit-frame-pointer -fno-gcse -fstrict-aliasing'
Sjeng: speed
Movegen speed: 475737/s
Make+unmake speed: 6313131/s
Movecycle speed: 3551136/s
Eval speed: 492125/s
-O2
Sjeng: speed
Movegen speed: 352360/s
Make+unmake speed: 6640106/s
Movecycle speed: 3773584/s
Eval speed: 411015/s
Reading specs from /usr/lib/gcc-lib/i586-pc-linux-gnulibc1/2.7.2.3/specs
gcc version 2.7.2.3
-O2
Sjeng: speed
Movegen speed: 384024/s
Make+unmake speed: 6578947/s
Movecycle speed: 3855050/s
Eval speed: 487329/s
make CC='ogcc' 'CFLAGS=-O9 -m386 -funroll-all-loops -fomit-frame-pointer'
Sjeng: speed
Movegen speed: 432900/s
Make+unmake speed: 6485084/s
Movecycle speed: 3996802/s
Eval speed: 517063/s
MSVC 6, best settings, binary running under Wine
Sjeng: speed
Movegen speed: 473081/s
Make+unmake speed: 8025682/s
Movecycle speed: 4405674/s
Eval speed: 602119/s
--
GCP