I understand the behavior of const
-qualified data types. I am curious, though, if there is any performance gain or loss from over- or under-zealousness of quali
const
is mainly a compile-time thing, however, declaring something as const
sometimes allows for certain optimizations. If the code in question isn't a performance bottleneck, I wouldn't worry about it and just use const
as intended: to produce clearer code and prevent yourself from doing stupid things.