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 08:38:53


#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:
-------------------------------+----------------------------
Description changed by psiha:

Old description:

> Hi, we're using your MP library, with the cpp_int_backend and fixed sized
> numbers, along with the "Maybe Boost Hash" library to implement
> lightweight RSA signature verification (previously done with
> LibTomCrypt+LibTomMath), so first of all thanks for making this possible
> ;)
>
> Unless otherwise stated, always assume I'm using MSVC10 32bit (with /Oxs
> /GL /LTCG) with the above use case (fixed size cpp_ints)...
>
> Now, onto the issues ;D
>
> I would expect do_assign() to simply evaluate to simply std::memcpy,
> however it does not:
> - it seems that the this->resize(other.size(), other.size()); call fails
> to resolve to a nop (check your code)
> - why are you using "checked std::copy" instead of a straigh std::memcpy?
>
> ps. MSVC has a very nice debugger and disassembly window so I'll refrain
> from posting codegen in any of my tickets.

New description:

 Hi, we're using your MP library, with the cpp_int_backend and fixed sized
 numbers, along with the "Maybe Boost Hash" library to implement
 lightweight RSA signature verification (previously done with
 LibTomCrypt+LibTomMath), so first of all thanks for making this possible
 ;)

 Unless otherwise stated, always assume I'm using MSVC10 32bit (with /Oxs
 /GL /LTCG) with the above use case (fixed sized, unchecked, unsigned
 cpp_ints)...

 Now, onto the issues ;D

 I would expect do_assign() to simply evaluate to simply std::memcpy,
 however it does not:
 - it seems that the this->resize(other.size(), other.size()); call fails
 to resolve to a nop (check your code)
 - why are you using "checked std::copy" instead of a straigh std::memcpy?

 ps. MSVC has a very nice debugger and disassembly window so I'll refrain
 from posting codegen in any of my tickets.

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