[map] Place item hash between key and value, not after them
This way if only one of key and value is 64bit (eg. pointer), and other is 32bit, the whole item will fit in 128bit, whereas before it would have been bumped up to 196 if only value was 64bit (a common use-case for us.)
This commit is contained in:
parent
ec6cefc46a
commit
ea2dd54b68
|
@ -68,8 +68,8 @@ struct hb_hashmap_t
|
||||||
struct item_t
|
struct item_t
|
||||||
{
|
{
|
||||||
K key;
|
K key;
|
||||||
V value;
|
|
||||||
uint32_t hash;
|
uint32_t hash;
|
||||||
|
V value;
|
||||||
|
|
||||||
void clear ()
|
void clear ()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue