public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: 龙海涛 <longhaitao@otsc.com.cn>
To: Christoph Bartoschek <bartoschek@gmx.de>
Cc: gcc-help@gcc.gnu.org
Subject: Re: a question about code optimization
Date: Tue, 25 Dec 2007 03:00:00 -0000	[thread overview]
Message-ID: <1198551608.2505.9.camel@localhost.localdomain> (raw)
In-Reply-To: <200712221121.22411.bartoschek@gmx.de>


> Here the situation is quite simple. Because a is a template the 
> vector<int>::size() method is probably included in the header files. This 
> means that the compiler can examine or inline the code of the method. If the 
> compiler additionally determines that in /*do something*/ the size is not 

i want to know whether Gcc can determines the size is changed or not...

i did some experiment, and the result is not bad.

anyone can give me some theoritical hints?

> changed, then the optimization is quite straigthforward
> 
> Christoph

  reply	other threads:[~2007-12-25  3:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-22  5:41 龙海涛
2007-12-22 10:20 ` Christoph Bartoschek
2007-12-25  3:00   ` 龙海涛 [this message]
     [not found] <C3A0E1D1.29B03%eljay@adobe.com>
2008-01-04 14:38 ` 龙海涛
2008-01-05 14:25   ` John Love-Jensen
2008-01-09 17:06     ` 龙海涛
2008-01-09 23:03       ` 龙海涛
2008-01-10 19:51       ` John Love-Jensen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1198551608.2505.9.camel@localhost.localdomain \
    --to=longhaitao@otsc.com.cn \
    --cc=bartoschek@gmx.de \
    --cc=gcc-help@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).