Module h3ron::collections

source ·
Expand description

Hashing

This crate uses ahash for its HashMap and HashSets. This hash hash shown in benchmarks to be approx. 10% faster with H3 indexes than the standard SipHash used in rust. On the other hand it shows a higher fluctuation in runtime during benchmarks. Interestingly the normally very fast rustc_hash (uses FxHash) seems to be very slow with H3 cells and edges. Mostly noticed during deserialization of graphs, but also during using the pathfinding crate which uses rustc_hash internally. May be related to https://github.com/rust-lang/rustc-hash/issues/14 and the quadratic insertion cost issue described here.

hashbrown is used as it supports some APIs which are still unstable on std::collections::HashMap.

Re-exports

Modules

Structs

  • Provides a Hasher factory. This is typically used (e.g. by HashMap) to create AHashers in order to hash the keys of the map. See build_hasher below.

Traits

  • generic trait to check if a index is contained in a collection

Type Aliases