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]
Other format: [Raw text]

RE: std::pow implementation


Go Gaby, I suspect most professional C++ coders are with you on this...

When i have used inline in my code (and i've written a lot of code) like
most coders i've generally assumed that it'll inline up to a sensible
limit(presumably dependant on target cache size/branch penalty tradeoff) and
if i write:

class bla
{
public:
  foo() {i=1;}
private:
  int i;
}

i damm well expect that foo() is inlined in all situations, cos its *always*
a win. If the new fancy inliner can't do this, it isn't worth its salt.


Rob Taylor
Senior Developer    robt at flyingpig dot com
Flying Pig Systems  http://www.flyingpig.com

Please avoid sending me Word or PowerPoint attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html
> -----Original Message-----
> From: gcc-owner@gcc.gnu.org [mailto:gcc-owner@gcc.gnu.org]On Behalf Of
> Gabriel Dos Reis
> Sent: 29 July 2003 16:12
> To: Michael Matz
> Cc: Steven Bosscher; Richard Guenther; gcc@gcc.gnu.org
> Subject: Re: std::pow implementation
>
>
> Michael Matz <matz@suse.de> writes:
>
> | > It is nonsense only after you have modified what I said.
> | >
> | > A simple function like 'std::string::end() const' should be cost-free.
> |
> | You are speaking about a special case (one small function) to
> support your
> | suggestion (makeing it happen for all functions).
>
> I'm taking it as examplar of one of the various kinds of unfortunate
> consequences that put people to believe that a public data member is
> faster than private.  Because, somehow it was decided that the compiler
> knows better.  The root is the same.
>
> -- Gaby
>


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