This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Function taking array parameters not inlined ?
- To: Joe Buck <jbuck at synopsys dot com>, aoliva at redhat dot com
- Subject: Re: Function taking array parameters not inlined ?
- From: David Bourguignon <David dot Bourguignon at imag dot fr>
- Date: Fri, 03 Aug 2001 15:44:55 +0200
- CC: gcc at gcc dot gnu dot org
- Organization: iMAGIS
- References: <200108021804.LAA24010@racerx.synopsys.com>
Thanks Joe and Alexandre for your answers.
I managed to get assembly code with -S option, but my expertise to see what's
wrong being very limited, I decided rather to try to change the code.
After rewriting it to avoid using pointer to struct data (initialized with
malloc), I got similar performance for both structs and arrays, with sgi cc and
gcc (but code generated with the latter is 2x slower...).
What is puzzling is that performance get 25% better with gcc when I am using
pointer to struct with malloc! (For sgi cc, a 2.5x slowdown is obtained, as
expected for a less efficient scheme).
Anyway, this gave me the occasion to learn a lot about optimization, assembly
code and the rest.
Thanks again for your help!
David.
N.B. : all files are on http://www-imagis.imag.fr/~David.Bourguignon/download
--
iMAGIS project, GRAVIR lab
INRIA Rhône-Alpes, 655 avenue de l'Europe
38330 Montbonnot Saint Martin, France
http://www-imagis.imag.fr/~David.Bourguignon/index.gb.html