I don't think it's possible to avoid the rehashing...
# getting-started
s
I don't think it's possible to avoid the rehashing of the map key. However I am not confident. We don't have reference types like C++ does. However I think it very rarely matters.