[Boost-bugs] [Boost C++ Libraries] #10363: Used unsigned long pieces for GMP _ui functions

Subject: [Boost-bugs] [Boost C++ Libraries] #10363: Used unsigned long pieces for GMP _ui functions
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-08-16 11:28:32


#10363: Used unsigned long pieces for GMP _ui functions
------------------------------+----------------------------
 Reporter: marc.glisse@… | Owner: johnmaddock
     Type: Feature Requests | Status: new
Milestone: To Be Determined | Component: multiprecision
  Version: Boost 1.56.0 | Severity: Optimization
 Keywords: |
------------------------------+----------------------------
 Hello,

 looking for something else, I was surprised to notice that, when it gets
 an 'unsigned long long', boost splits it in pieces of type 'unsigned' to
 pass them to GMP functions, when it could use bigger 'unsigned long'
 pieces for better performance. When long and long long have the same size,
 it would avoid any splitting.

 Also, I believe using << or >> with numeric_limits<unsigned>::digits is
 undefined behavior if int and long long have the same size (maybe that's
 why you didn't use long, because there are much fewer platforms where int
 and long long have the same size).

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/10363>
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:16 UTC