You can avoid the string terminator hashing on a case by case basis.
Comparing inserting 10,000 elements (no reallocation) on HashMap with the default hasher (SipHash13)
Some benches with very short strings (stringified integers 0…10,000)
test insert_hashmap_string_10_000 ... bench: 1,248,610 ns/iter (+/- 19,435)
test insert_hashmap_string_oneshot_10_000 ... bench: 1,211,014 ns/iter (+/- 18,908)
test lookup_hashmap_10_000_exist_string ... bench: 199,742 ns/iter (+/- 1,870)
test lookup_hashmap_10_000_exist_string_oneshot ... bench: 177,365 ns/iter (+/- 2,821)
“one shot” hashing adaptor for strings code in a gist