Q:

Is it good practice to make every const string be referenced?

Code A:
string a = "Hello World";

for (int i=0; i<1000000; ++i) 
     const string b = a;

Code B: 
string a = "Hello World";

for (int i=0; i<1000000; ++i) 
     const string &b = a;

If I run the 2 codes separately and measure CPU time, the Code B was about 2.5 times faster than the Code A.
Except for the primitive types such as char, int, float... I learned it is faster to get a reference to the original rather than copying it.
Although the difference is almost neglectable in most cases, can it be considered as a good practice to always make const string type(and other non-primitive types) be referenced?

A:

Yes, it is generally better to use a const reference for any object that is expensive to copy. But you must take care that the original object doesn't change when you don't expect it; in particular you need to make sure that the original object isn't destroyed, because that leads to undefined behavior. That isn't a problem in your toy example, but in the real world it's a big concern.
The best place to use a const reference is in function parameters. You know that the object passed into the function can't change or be destroyed while still inside the function.

