two-element struct performance (was: strict-aliasing and typedefs)

Joe Buck jbuck@synopsys.com
Wed May 14 23:06:00 GMT 2003


On Thu, May 15, 2003 at 12:49:23AM +0200, Gabriel Dos Reis wrote:
> | > Would that loss of performance be related to ABI issues (in single
> | > element case)? 
> | 
> | No, it has to do with premature commitment of structs to memory.
> 
> Aha, thanks.  I thought that since some ABIs seem to require that every
> structure ought to be returned in memory, GCC (on those targets)
> cannot optimize away the abstraction penatly in the case a structure
> contains a single or two scalar(s). 

ABI rules don't affect what can be done with local (after inlining) structs
and classes, and that's where GCC is getting killed by, say, KAI's compiler.
 



More information about the Gcc mailing list