const
correctness is a good thing with respect to maintainability. Otherwise, clients of your class could break that class's internal members. For instance, consider the standard std::string::c_str()
-- if it couldn't return a const value, you'd be able to screw around with the internal buffer of the string!
That said, any compiler worth it's salt is going to be able to detect if a variable is really constant or not, and apply correct optimizations. Don't use const
for performance reasons. Use it for maintainability reasons.