This is the mail archive of the gcc-help@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: Performance, for(int i...) vs for(i...)


On Sun, Aug 26, 2012 at 8:30 AM,  <lab@kayohamid.net> wrote:
>
> the result of forin.c and forout.c is the same:

You are compiling without optimization.  If you are interested in
performance, use the -O2 option.

> Seeing this, can I say that using int inside the for or outside for is the
> same? Have no difference on performance?

Correct: it has no difference in performance.  Why would it?

Ian


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