This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Function taking array parameters not inlined ?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]