I was given some code in which some of the parameters are pointers, and then the pointers are dereferenced to provide values. I was concerned that the pointer dereferencing wou
All the other answers already point out that neither function is superior to the other in terms of runtime performance.
However, I think that that the former function is superior to the other in terms of readability, because a call like
f( &a, &b );
clearly expresses that a reference to some variable is passed (which, to me, rings the 'this object might be modified by the function' bell). The version which takes references instead of pointers just looks like
f( a, b );
It would be fairly surprising to me to see that a
changed after the call, because I cannot tell from the invocation that the variable is passed by reference.