Is it better to pass a C++ object by reference than by value if it is in RAM?
Advertisements There is a widespread opinion that in the C++ language it is better to pass an object to a function by reference than by value (thus supposedly reducing the number of copies). But what if this object is located in RAM (not in processor the cache) and the function itself accesses the fields of… Read More Is it better to pass a C++ object by reference than by value if it is in RAM?