Opened 8 years ago

Closed 8 years ago

#10363 closed Feature Requests (fixed)

Used unsigned long pieces for GMP _ui functions

Reported by: marc.glisse@… Owned by: John Maddock
Milestone: To Be Determined Component: multiprecision
Version: Boost 1.56.0 Severity: Optimization
Keywords: Cc:

Description

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).

Change History (1)

comment:1 by John Maddock, 8 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.