From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 857 invoked by alias); 17 Jul 2009 04:23:10 -0000 Received: (qmail 847 invoked by uid 22791); 17 Jul 2009 04:23:09 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from saratoga.rkirkpat.net (HELO saratoga.rkirkpat.net) (206.196.156.29) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 17 Jul 2009 04:23:02 +0000 Received: by saratoga.rkirkpat.net (Postfix, from userid 33) id 155D57180B; Thu, 16 Jul 2009 22:22:59 -0600 (MDT) From: "Bill McEnaney" To: Bob Plantz , Ian Lance Taylor , Honggang Xu , Andrew Haley , David Daney , gcc-help@gcc.gnu.org Subject: Re: Is this a bug? X-IPAddress: 67.242.192.183 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Message-Id: <20090717042259.155D57180B@saratoga.rkirkpat.net> Date: Fri, 17 Jul 2009 04:23:00 -0000 X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2009-07/txt/msg00280.txt.bz2 Bob told us his preference. So I'll admit my preferences: Haskell, Ocaml, Prolog, Python, and Lisp, probably in that order. Bill > On Thu, 2009-07-16 at 17:31 -0700, Ian Lance Taylor wrote: > > For an integer type there is no performance difference between ++x and > > x++. > > > > For a C++ class which defines operator++ and a copy constructor, there > > can be performance differences between ++x and x++. The latter often > > requires the compiler to invoke the copy constructor to hold onto the > > old value before invoking operator++. So if you are writing C++, it's > > often a good idea to write ++x when x is a class type, such as an STL > > iterator. The compiler can sometimes eliminate the copy constructor, > > but not always. > > > > Ian > > Thank you, Ian. Being mostly a C programmer, I often forget about the > things that C++ does behind the scenes. > > My real preference is assembly language. Then it's just me and the > machine. ;) > > Bob > > > ________________________________________________________________ Please visit a saintly hero: http://www.jakemoore.org