This is actually usually used as a correctness aid rather than for any compiler optimization. If you has a pass-by-value, marking it const
like this will prevent you from accidentally modifying the parameter when you intended something else.
Even so it's still not an entirely common form.
Theoretically it could enable the compiler to load from memory into a register once and avoid rereading the value, but the compiler can often figure this out on its own without help because unless you go out of your way to alias the parameter the compiler can see where it's being updated within the function's scope.