Skip to content

Commit

Permalink
Merge pull request godotengine#76403 from bitsawer/reduce_hashmap_size
Browse files Browse the repository at this point in the history
Optimize HashMap size
  • Loading branch information
akien-mga committed Apr 24, 2023
2 parents 9098698 + 723f2f3 commit 14c582b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/templates/hash_map.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 14c582b

Please sign in to comment.