K
K. Frank
Hello Group!
Let's say I have a function that takes a std::string as an
argument. Are there any rules of thumb for when is is likely
to be more efficient to pass the string by value instead of
const reference?
I understand that the specific details matter such as how big
the string is and how often it is accessed in the function.
I'm wondering if there are any rough guidelines for which
approach is likely to be faster.
Thanks.
K. Frank
Let's say I have a function that takes a std::string as an
argument. Are there any rules of thumb for when is is likely
to be more efficient to pass the string by value instead of
const reference?
I understand that the specific details matter such as how big
the string is and how often it is accessed in the function.
I'm wondering if there are any rough guidelines for which
approach is likely to be faster.
Thanks.
K. Frank