GCC viciously beaten by ICC in trig test!

Scott Robert Ladd coyote@coyotegulch.com
Mon Mar 15 04:06:00 GMT 2004


Gabriel Dos Reis wrote:
> In summary,  in order to get decent codes from GCC on Linux, nobody
> should be including standard headers supposed to bring appropriate
> declarations for names used in codes.  Oh well.

And the other solution -- using -D__NO_INLINE__ -- is counterintuitive 
(though effective on my "doit" example, according to a quick test I just 
ran.) Why would someone seeking to generate fast code use a definition 
that disables inline functions?

It appears that two generalized, portable solutions (glibc and gcc) 
cancel each other out, resulting in poor code generation.

Perhaps GCC can be modified to automatically use the -D__NO_INLINE__ 
switch on glibc platforms -- although using that switch may not always 
be wise. I compiled one of my "big" applications with -D__NO_INLINE__, 
and it's run-time was reduced substantially -- to ZERO. I'm too tired 
tonight to figure out why; I'll look into it tomorrow.

> In real world, people have to include standard headers in order to get
> appropriate declarations.

Exactly. The provided solution isn't really a solution, given that 
portable code is going to use ANSI standard headers by definition.


-- 
Scott Robert Ladd
Coyote Gulch Productions (http://www.coyotegulch.com)
Software Invention for High-Performance Computing



More information about the Gcc mailing list