Merge pull request #76403 from bitsawer/reduce_hashmap_size

Optimize HashMap size
This commit is contained in:
Rémi Verschelde 2023-04-24 16:49:12 +02:00
commit 14c582bca8
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 3 additions and 3 deletions

View File

@ -67,9 +67,9 @@ template <class TKey, class TValue,
class Allocator = DefaultTypedAllocator<HashMapElement<TKey, TValue>>>
class HashMap {
public:
const uint32_t MIN_CAPACITY_INDEX = 2; // Use a prime.
const float MAX_OCCUPANCY = 0.75;
const uint32_t EMPTY_HASH = 0;
static constexpr uint32_t MIN_CAPACITY_INDEX = 2; // Use a prime.
static constexpr float MAX_OCCUPANCY = 0.75;
static constexpr uint32_t EMPTY_HASH = 0;
private:
Allocator element_alloc;