[Bug middle-end/21628] GCC much slower than ICL. Lack of inlining?

laurent at ient dot rwth-aachen dot de gcc-bugzilla@gcc.gnu.org
Fri Nov 16 17:46:00 GMT 2007



------- Comment #2 from laurent at ient dot rwth-aachen dot de  2007-11-16 17:46 -------
(In reply to comment #1)
> What does -Winline say?
> 
> Have you tried with always_inline? Example:
> 
>      /* Prototype.  */
>      inline void foo (const char) __attribute__((always_inline));
> 
Whaow, I have posted this report for a while...!!!

As I posted, GCC was at version 3.x.
"Winline" said that many functions were not inlined despite of the presence of
the keyword 'inline'.
yes, I did try "__attribute__((__always_inline__))". 

But Since version 4.2, GCC seems to respect this attribute, at least!!! 
This was a great improvement for me, I have really waited for this feature.

I once found a page, where a very important person in the Linux world (cannot
remember who now, Linux Toward probably) complained about the lack of inlining
in linux-Kernel, that there were no way to force GCC, etc...
I am glad that this person was heard by GCC developers...

It improved a lot the performance of my library compiled with GCC.
But honestly ICL (Intel Compiler for Windows) is still much better in
optimisations.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21628



More information about the Gcc-bugs mailing list