2
what is the difference in performance ( in the case of large object) the calls below:
void funcao( const tipo &objeto )
and
void funcao( const tipo *objeto )
I know that the first receives a constant reference, which is good not to need to copy the object , only creates a nickname for the object, and how and const
, the object cannot be modified;
and (I know that) in the second receives the address of the object , and how is const
, the object cannot be modified.
Good question. I believe that if there is a performance difference it will be very small, because probably the compiler turns in this differentiation. P.S.: It’s going to be one of those questions that only @bigown solves. :)
– Luiz Vieira