Computer Chess Club Archives


Search

Terms

Messages

Subject: IBM G4/G5 Compiler

Author: Rick Bischoff

Date: 07:04:26 08/29/03


Hi all,

As you may or may not know, IBM has released their C/C++/Fortran compiler for
Mac OS X.  Here are some results from running said compiler against GCC with
various optimizations-- Tom's simple chess program (TSCP) is used (i.e., the
bench command).  The machine was my G4 tower (dual 867 w 1 GB Ram):

GCC - "gcc *.c -o tscp_gcc0" produces
Trial NPS Score
1 44101 0.181
2 43977 0.181
3 45197 0.186

IBM - "xlc *.c -o tscp_ibm0":
4 54253 0.223
5 54387 0.224
6 54424 0.224

GCC - "gcc -O *.c -o tscp_gcc1":
7 113632 0.467
8 113609 0.467
9 113797 0.468

IBM - "xlc -O *.c -o tscp_ibm1"
10 138769 0.571
11 138769 0.571
12 138560 0.570

GCC - "gcc -O2 *.c -o tscp_gcc2"
13 121156 0.498
14 120811 0.497
15 121076 0.498

IBM -O2 not tested as man page says it is equivalent to -O

GCC - "gcc -O3 *.c -o tscp_gcc3"
16 119448 0.491
17 119734 0.492
18 120414 0.495

IBM - "xlc -O3 *.c -o tscp_ibm3"
19 150939 0.621
20 150815 0.620
21 149994 0.617

IBM - "xlc -O4 *.c -o tscp_ibm4"
22 167613 0.689
23 167868 0.690
24 168330 0.692

IBM - "xlc -O5 *.c -o tscp_ibm5"
25 168691 0.694
26 168451 0.693
27 168536 0.693

Executable size
gcc0 47076
gcc1 38948
gcc2 38948
gcc3 38948
ibm0 47164
ibm1 43068
ibm3 51260
ibm4 71468
ibm5 104500

(I ran diff on the gcc executables of the same size and it assures me they are
different! That is somewhat unusual?)

Anyway, it looks like the IBM compiler is a sure win over GCC if you are running
TSCP :-) I haven't been able to get Crafty to compile cleanly wih it yet, when I
do I will post an update.  If you know of any other compiler flags for GCC or
the IBM compiler let me know and I will test those too.

Rick




This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.