Re: [Boost-bugs] [Boost C++ Libraries] #9231: Suboptimal assignment

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #9231: Suboptimal assignment
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-10-12 10:02:41


#9231: Suboptimal assignment
-------------------------------+----------------------------
  Reporter: psiha | Owner: johnmaddock
      Type: Bugs | Status: closed
 Milestone: To Be Determined | Component: multiprecision
   Version: Boost 1.54.0 | Severity: Optimization
Resolution: fixed | Keywords:
-------------------------------+----------------------------

Comment (by johnmaddock):

>Thanks... ps. did you check why this->resize(other.size(), other.size());
 does not evaluate to a nop (I forgot to add that this happens in powm when
 it copy-constructs the double_type)_?

 Sigh.... this is harder to optimize away - it goes via a general N bit to
 M bit conversion routine (which is already split many different ways, I
 really don't want to split it up any more or it becomes unmaintainable) so
 there is a check that the new size requested doesn't exceed the space
 available. This situation can also happen in calls to resize() from
 addition/subtraction/multiplication/shift routines, as it has to handle
 overflow in these cases.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/9231#comment:5>
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:14 UTC