Does const call by reference improve performance when applied to primitive types?
问题 Concerning objects (especially strings), call by reference is faster than call-by-value because the function call does not need to create a copy of the original object. Using const, one can also ensure that the reference is not abused. My question is whether const call-by-reference is also faster if using primitive types, like bool, int or double. void doSomething(const string & strInput, unsigned int iMode); void doSomething(const string & strInput, const unsigned int & iMode); My suspicion