HashingStrategy Enumeration

KGy SOFT Core Libraries Help
Represents a hashing strategy for some hash-based dictionaries and caches.

Namespace:  KGySoft.Collections
Assembly:  KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 6.0.0-rc.1

public enum HashingStrategy

  Member nameValueDescription
Auto0 The hashing strategy is determined by the type of the key in the storage. For string keys and sealed key types without an overloaded GetHashCode the And hashing strategy will be used, while for any other key types the Modulo hashing strategy will be used.
Modulo1 Represents the modulo division hashing strategy. This is quite robust even for poor GetHashCode implementations but is a bit slower than the bitwise AND hashing strategy.
And2 Represents the bitwise AND hashing strategy. While the hashing itself is very fast, this solution is quite sensitive for poorer GetHashCode implementations that may cause many key collisions, which may end up in a poorer performance.
See Also