I have read numerous times that enforcing const-correctness in your C or C++ code is not only a good practice with regards to maintainability, but also it may allow your com
in my experience, no
For scalar variables, compiler is able to determine whenever the value is changed and perform necessary optimization itself.
For array pointers, const correctness is no guarantee that values are really constant in presence of potential aliasing problems. Hence compiler can not use const modifier alone to perform optimizations
if you are looking optimization, you should consider __restrict__ or special function modifiers/attributes: http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html