Hi,
I am writing my own integer data type because I need to check
overflow. For example, if I have 2 very big unsigned int to add up,
there might be overflow happening. So i will have my own integer type
and override operator + and *.
All the data I will operate are 32 bit integer, so inside my data
type, I can use "unsigned int". Or I can use "unsigned long". If I use
"unsigned int", I need to check if the sum is lower than the operand.
If I use "unsigned long", I need to check if the sum is larger than
0x1_0000_0000.
But my concern is since our computers are all 32 bit, will that slow
the program a lot if I use "unsigned long"?
My code is not scientific purpose, but it has a lot data calculation,
and code speed is a concern.
Thanks.