I have read a few posts (e.g., C++ built-in types), saying that for modern intel XEON CPU, there is no difference between using int32_t and using a double.
However, I have noticed that when I do vector multiplication,
std::vector<T> a, b, c;
// run some initialization
for( std::size_t i = 0; i < 1000000; ++i){
c[i] = a[i] * b[i];
}
if I set T as int32_t, this piece of code runs much faster than setting T to double.
I am running this on XEON E5620 + centOS
Can anyone clarify a bit here? Is using int32_t faster or not?