Re: [Boost-bugs] [Boost C++ Libraries] #8081: suggestion: avoid using postfix operator++ in transform_width

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #8081: suggestion: avoid using postfix operator++ in transform_width
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-02-25 20:13:27


#8081: suggestion: avoid using postfix operator++ in transform_width
-------------------------------+--------------------------------------------
  Reporter: jinmei@… | Owner: ramey
      Type: Patches | Status: closed
 Milestone: To Be Determined | Component: serialization
   Version: Boost 1.53.0 | Severity: Optimization
Resolution: invalid | Keywords:
-------------------------------+--------------------------------------------
Changes (by ramey):

  * status: new => closed
  * resolution: => invalid

Comment:

 "use of the postfix version is suboptimal in terms of efficiency"

 Not in this case.

 ++i is more efficient that i++

 but
 x = i; ++i

 is NOT more efficient than x = i++.

 If you check the generated machine language you'll see this.

 Robert Ramey

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/8081#comment:1>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:12 UTC