mirror of
https://github.com/Redot-Engine/redot-engine.git
synced 2025-12-06 23:31:53 -05:00
Optimize HashMap size
This commit is contained in:
@@ -67,9 +67,9 @@ template <class TKey, class TValue,
|
|||||||
class Allocator = DefaultTypedAllocator<HashMapElement<TKey, TValue>>>
|
class Allocator = DefaultTypedAllocator<HashMapElement<TKey, TValue>>>
|
||||||
class HashMap {
|
class HashMap {
|
||||||
public:
|
public:
|
||||||
const uint32_t MIN_CAPACITY_INDEX = 2; // Use a prime.
|
static constexpr uint32_t MIN_CAPACITY_INDEX = 2; // Use a prime.
|
||||||
const float MAX_OCCUPANCY = 0.75;
|
static constexpr float MAX_OCCUPANCY = 0.75;
|
||||||
const uint32_t EMPTY_HASH = 0;
|
static constexpr uint32_t EMPTY_HASH = 0;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Allocator element_alloc;
|
Allocator element_alloc;
|
||||||
|
|||||||
Reference in New Issue
Block a user