If I perform a computation written in C, something like matrix-matrix addition or matrix-matrix multiplication, where the work is done in a for
loop, with the same number and type of arithmetic operations happening on each iteration, could the specific values of the input data impact the speed of the computation? For example, if the matrix elements are 32-bit integers with values between 0 and 127, so that their representations vary only in one out of each four corresponding bytes, would that run faster than if the values varied between 0 and INT_MAX
(supposing no undefined behavior occurs)?
If I had to guess I would say no, because whether or not the value is small or very large, since it is defined as a 32-bit integer it will be masked to fit in the same amount of memory space so the small and large values will end up having the same amount of bytes in memory. Am I thinking about this correctly? Is it different for single/double precision floating point numbers?