Question regarding passing a reference to a function

My question is specifically “why?”.

Why would someone implements Function(&Parameter) instead Function(Parameter)?

Is it solely for performance or there’s more to it? If instead a reference, the “full” thing is called, what happens? Does it creates a copy of the parameter for “temporary” use inside the function that called it?

Privacy & Terms