D&C Lug - Home Page
Devon & Cornwall Linux Users' Group

[ Date Index ][ Thread Index ]
[ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] GCC debug info and some other garbage.



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Andrew Rogers wrote:
> A friend has compiled his program on both GCC 2.96 and MS
Visual C++ (I
> don't know which release). He claims that Visual C++ gives a
two fold
> speed increase to his program. As I did not want to believe
this I set
> about investigating the cause of this apparent speed increase.

As a maintainer of a chess program we have a keen interest in
performance.

For C code both Intel and Microsoft compilers outperform GCC on
Intel hardware for most benchmarks, although not usually by 50%.

Most real world applications are closer, and in some cases high
level optimisations in GCC will result in code that performs
commercial compilers.

GCC's real strength is it works pretty well everywhere, not that
it produces the fastest code, which in compilers usually goes to
those who know the hardware best - (read Intels compiler
produces fast code).

Now what is the program doing would be my first question,
especially what system routines, as unless it is producing the
same native system calls it may not be a direct comparison.

> I can't seem to find a way to remove this debugging info and
> there are no -g switches in my GCC command line.

man strip ?

What does this information look like, what does "file
<executable>" return.

> Slighty seperate issue, I compiled a program with -O3
(optimisation) on
> both GCC 2.96 and GCC 3.2 but they both execute at exactly the
same
> speed. I thought that GCC 3.2 had significantly improved
optimisation.

GCC 3 executes GNU Chess with about 20% improvement in nodes per
second on same hardware (Cyrix 166MHz).

You have to have code that the new optimisations work on.....

> Is there any new optimisation command line switches in GCC 3.2
that I
> may have missed?

I'd suggest profiling and looking at what is actually consuming
CPU, and compare between compilers if possible.
-----BEGIN PGP SIGNATURE-----
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE+Y9MzGFXfHI9FVgYRAnfvAKCGYFryeW35oPX3tg3uOyuoylrCsACg2FU/
9NVn6qLEuc2Vh1ZUob3X/y0=
=xiYs
-----END PGP SIGNATURE-----

--
The Mailing List for the Devon & Cornwall LUG
Mail majordomo@xxxxxxxxxxxx with "unsubscribe list" in the
message body to unsubscribe.


Lynx friendly