Re:There Are Only Four Billion Floats – So Test Them All
by chii on Tuesday January 28, 2014 @05:22AM
(#7136321)
but you didn't consider the other case, which imho, is more common - where you thought 1 char ought to be enough for anybody...until it isn't, and it's impossible to make it into a 32bit integer...
[ Parent
| on HN ]
Re:There Are Only Four Billion Floats – So Test Them All
by hvidgaard on Wednesday January 29, 2014 @03:57AM
(#7142797)
Only when requirements have changed significantly, have I had to change the datatype. Either the input resolution are increased significantly, or the amount of data is several magnitudes larger than original specified, or higher precision is required. I tend to err on the side of selecting something larger if I'm uncertain.
Consider a database: If expected data amounts to 10 inserts pr second, and the application lifetime is expected to be 10 years, 32-bit is enough to index. However, there is only room for 36% growth, so 64-bit it is, unless performance is important. In that case watch the index and project when it will run out of space.
The point is, you consider the cases, and make an educated choice, this means reasoning about it both ways.