Edit: As many people have pointed out, pass-by-reference isn\'t generally appropriate as an optimisation for primitive types. This is excellent to know, so
First you should take heed of the other's advice to prefer passing by value for simple types. C (and by extension C++) were designed with this use case in mind, and that's what they're optimized for.
Second you should always use a const
reference unless you intend to modify the variable. A literal can be bound to a const reference but not a non-const one.