From 4255956603260824339
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,2e93f66caf45e850
X-Google-Attributes: gidf78e5,public
From: "B. James Phillippe" <bryan@terran.org>
Subject: foo++ vs. ++foo (was Re: var::x)
Date: 1998/04/24
Message-ID: <Pine.LNX.3.96.980423232203.8843A-100000@earth.terran.org>#1/1
X-Deja-AN: 347225676
Approved: Fergus Henderson <fjh@cs.mu.oz.au>
References: <6hac24$8lb$2@news2.isdnet.net> <6hd9vn$dau$1@camel15.mindspring.com>
X-Original-Date: Thu, 23 Apr 1998 23:23:54 -0700
Mime-Version: 1.0
X-Subliminal-Message: Use Linux
Content-Type: TEXT/PLAIN; charset=US-ASCII
Organization: Terran.ORG/LinuxWorld.NET
X-Auth: PGPMoose V1.1 PGP comp.std.c++ iQBFAgUANUAyzuEDnX0m9pzZAQGVmQF/WfvQVSG0Vqs1eNzUTTe4xP57SKJVHT58 tnvG/M3uaXiX28pjywnEI3+6vCJFU4S7 =rBdu
Newsgroups: comp.std.c++


On 20 Apr 1998, Chuck McCorvey wrote:

> Also, notice that I used "++i" rather than "i++" in the macro.  This can
> make a significant performance difference as the former avoids the necessity
> of creating a temporary.

Really?  How so?  I have never heard this before, and I generally use foo++
over ++foo (in situations where it doesn't matter).

thanks,
-bp
--
B. James Phillippe <bryan@terran.org>
Linux Software Engineer, WGT Inc.
http://earth.terran.org/~bryan
---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]



