On inlining in C++

Andrew Haley aph@redhat.com
Mon Aug 4 17:26:00 GMT 2003


Robert Dewar writes:
 > > I do not believe that would be a surprise to anyone who thought about
 > > it for a minute.
 > 
 > 
 > Well I prefer to rely on my experience (which is that I have seen a lot
 > of cases in which users are surprised to find that inlining slows things
 > down), than your belief :-)

"we find that customers are quite often surprised to find that -O3
is slower than -O2 (as well as generating lots of code)."

and

"I do not believe that would be a surprise to anyone who thought about
it for a minute."

don't conflict.

 > Again, what is really needed is data. We have lots of data on this
 > issue in the Ada world, surely there are useful examples in the C++
 > world that could argue the case more effectively than people
 > stating what they believe to be the case?

People are looking at this problem from two different angles:

a.  What will, on average, give the best performance?
b.  What will, on average, cause the least trouble?

Andrew.



More information about the Gcc mailing list