What is the difference in terms of performance (in the case of large object) the calls below:
void funcao( const tipo &objeto )
and
void funcao( const tipo *objeto )
I know that in the first one it receives a constant reference, which is good not to need to copy the object, it only creates a nickname for the object, and since e const
, the object can not be modified;
and (I know that) in the second it receives the address of the object, and since it is const
, the object can not be modified.