Skip to content

Commit 14c582b

Browse files
committed
Merge pull request #76403 from bitsawer/reduce_hashmap_size
Optimize HashMap size
2 parents 9098698 + 723f2f3 commit 14c582b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

core/templates/hash_map.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ template <class TKey, class TValue,
6767
class Allocator = DefaultTypedAllocator<HashMapElement<TKey, TValue>>>
6868
class HashMap {
6969
public:
70-
const uint32_t MIN_CAPACITY_INDEX = 2; // Use a prime.
71-
const float MAX_OCCUPANCY = 0.75;
72-
const uint32_t EMPTY_HASH = 0;
70+
static constexpr uint32_t MIN_CAPACITY_INDEX = 2; // Use a prime.
71+
static constexpr float MAX_OCCUPANCY = 0.75;
72+
static constexpr uint32_t EMPTY_HASH = 0;
7373

7474
private:
7575
Allocator element_alloc;

0 commit comments

Comments
 (0)