I hope you know that from the point of view of function declarations, these two are identical , that is, they declare the same function !!!
Now, with regard to definitions, I canโt say if there are any enhancements, but I can promise you that there is no significant increase. I don't think modern compilers are stupid. Most of them are smarter than you and me.))
There is another side. Some programmers will prefer to add const wherever applicable to be truly const-correct . This is a valid point of view and practice. But then again, I would not do this just for performance issues.
Armen Tsirunyan
source share