Struct anymap::TypeIdHasher
source · [−]pub struct TypeIdHasher { /* private fields */ }
Expand description
A hasher designed to eke a little more speed out, given TypeId
’s known characteristics.
Specifically, this is a no-op hasher that expects to be fed a u64’s worth of
randomly-distributed bits. It works well for TypeId
(eliminating start-up time, so that my
get_missing benchmark is ~30ns rather than ~900ns, and being a good deal faster after that, so
that my insert_and_get_on_260_types benchmark is ~12μs instead of ~21.5μs), but will
panic in debug mode and always emit zeros in release mode for any other sorts of inputs, so
yeah, don’t use it! 😀
Trait Implementations
Returns the “default value” for a type. Read more
Writes a single u128
into this hasher.
Writes a single usize
into this hasher.
Writes a single i128
into this hasher.
Writes a single isize
into this hasher.