Boost logo

Boost Users :

From: Zeljko Vrba (zvrba_at_[hidden])
Date: 2008-08-18 02:14:57


On Sun, Aug 17, 2008 at 09:16:29PM +0200, Andrea Denzler wrote:
>
> I may add that C/C++ have different integer sizes on different platforms
> adding even more confusion. I understand that a basic int has the size of
> the processor register, but when I handle and store data values I want to
>
"The size of processor register" has become very vague with the arrival of
AMD64. Registers are 64-bit, but the default operand size is 32-bit. 64-bit
integer arithmetic requires an extra instruction prefix.. So, in a sense,
32-bit integers are still the most efficient integer datatype even on AMD64
(and indeed, "int" is 32-bits). AMD64 is just an example that first comes
to mind; there are probably other similar architectures...

>
> That's why a class (or new standard integer types) handling those confusions
> is really welcome. Until now I rely on crossplatform integer sizes (uint16,
>
OK, I might start to write some code in my free time soon.. If for nothing
else, then to experiment with the Boost.Operators library and playing with
numeric traits. (and because I like to code in assembler :-)) In the first
round, the class will only support x86/AMD64; in the second round I will
apply the black magic from "Hacker's Delight" and write it portably.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net