Does it matter whether or not I pass a small object by const value or const reference on a mondern compiler? For example I have a couple of methods accepting and not modifying boost::units::quantity<boost::units::si::length, float> which should be optimized to float anyway.
Normally I would declare the argument's type as a const reference but I'm afraid the compiler cannot optimize the templates way if I do that.
Edit: what I didn't think of but was mentioned by rahul.deshmukhpatil in the comments, if I accept const&
the compiler has to at least emit double code in the case I'm invoking from a multithreaded enviroment.