I have the typical function to write data to a binary file.
( reinterpret_cast< char*> (&value); )
A function can be written so:
1: void My_function_write( const double & value)
2: void My_function_write( double & value)
Are going to be faster 1 than 2 ?
In case of you recommend to use 1, I have to do some const_cast before the reinterpret_cast from double to char. So the question is the same: in this case 1 has become slower than 2 ?