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
My understanding is that const can be used by the compiler to potentially optimize performance, but is no guarantee of such; there shouldn't be a performance downside, though. It could potentially affect runtime behavior (ie: the compiler could put const variables on read-only memory pages).
It should not have a significant impact on performance, but I'd error on using it more for ease of code maintenance. Just my opinion, though.