Posted By:
Abey_Mullassery
Posted On:
Wednesday, July 18, 2001 05:25 AM
I need to support Unsigned 64 bit Integer values in my application. These values come for an external C++ program. I also need to support 32 bit unsigned, 16 bit unsigned, etc., too but they can be done with the wrapper class which uses a higher data-type in java itself and a check for the sign. The problem arises when I come to the limit of 64 bit values. I also have to do bit wise operations and arithmetic operations on these values. Hence I need to easily get the bit structure too. I tried to make a class using a BigInteger which can support all these functions and sign checking, but it is about 10 times slower than normal operations (I timed it with BigInteger addition and Integer additio
More>>
I need to support
Unsigned
64 bit Integer values in my application. These values come for an external C++ program.
I also need to support 32 bit unsigned, 16 bit unsigned, etc., too but they can be done with the wrapper class which uses a higher data-type in java itself and a check for the sign.
The problem arises when I come to the limit of 64 bit values.
I also have to do bit wise operations and arithmetic operations on these values. Hence I need to easily get the bit structure too.
I tried to make a class using a
BigInteger
which can support all these functions and sign checking, but it is about 10 times slower than normal operations (I timed it with BigInteger addition and Integer addition)!
Can anyone suggest a better alternative?
<<Less