Commit c1b6f488 authored by Justin Lebar's avatar Justin Lebar Committed by TensorFlower Gardener
Browse files

Switch FlatMap and FlatSet to use a non-identity hasher for pointers.

Previously the default hasher for FlatMap and FlatSet used std::hash by
default.  Most stdlibs' std::hash for pointers is the identity function.
This works for std::unordered_{set,map} because those are prime-sized
hashtables.  But FlatSet and FlatMap are power-of-two-sized, and so the
identity function is bad, bad news.

This change also switches us to use Hash64 for strings, rather than
std::hash.
PiperOrigin-RevId: 161553663
parent 082ede6c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment