[map] Rewrite hash() as dagger
Somehow our daggers instead of for loop save size. I cannot pinpoint why, other than maybe not inlining.
This commit is contained in:
parent
025a68cb07
commit
4ec706980c
|
@ -250,10 +250,10 @@ struct hb_hashmap_t
|
||||||
|
|
||||||
uint32_t hash () const
|
uint32_t hash () const
|
||||||
{
|
{
|
||||||
uint32_t h = 0;
|
return
|
||||||
for (auto item : iter_items ())
|
+ iter_items ()
|
||||||
h ^= item.total_hash ();
|
| hb_reduce ([] (uint32_t h, const item_t &_) { return h ^ _.total_hash (); }, (uint32_t) 0u)
|
||||||
return h;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool is_equal (const hb_hashmap_t &other) const
|
bool is_equal (const hb_hashmap_t &other) const
|
||||||
|
|
Loading…
Reference in New Issue