I am currently reading a chapter in a textbook on Processor Architecture and saw the following statement:
The less precision there is, the less space is occupied by a program variable in memory. Further, there is often a time advantage, both in ferrying the operands back and forth between the processor and memory, and for arithmetic and logic operations that need less precision. This is particularly true for floating-point arithmetic operations.
Why are less precise data like float sometimes faster than larger, more precise data like double? Can somebody develop on this explanation and maybe give an example?
float
is noticeably faster than larger, more precise data likedouble
orlong double
”.double
or extended-precision numbers.