On Tue, 2007-08-21 at 21:26 +0200, Andreas Mohr wrote:

> Also, it is known to be very advisable to do ++var instead of var++ in
> iterator-type loops, since this avoids an unnecessary check in asm code
> (--> smaller binary size).
> E.g. in the
>    for (vector<Item>::iterator I = List.begin(); I != List.end(); I++)
> line and others.

As my very fast tests with g++ 4.1.3 shown, it matters indeed (18 bytes
difference between I++ and ++I in favor of ++I) but only with -O0.
The generated code is not affected by type of increment operator when
the compiler is used with -O2 switch.

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
Power mailing list
[email protected]
http://www.bughost.org/mailman/listinfo/power

Reply via email to