mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-25 08:51:07 +01:00
Revert "[map] Speedup for int types"
This reverts commit c1b75f5ff0.
I was seeing very long chains (140) and a 17% slowdown in
BM_subset/subset_codepoints/RobotoFlex-Variable.ttf/512
Bummer.
This commit is contained in:
1 parent
c1b75f5ff0
commit
4a93576bca
1 file changed
+2
-2
+2
-2
@@ -212,7 +212,7 @@ struct hb_hashmap_t
|
||||
|
||||
hash &= 0x3FFFFFFF; // We only store lower 30bit of hash
|
||||
unsigned int tombstone = (unsigned int) -1;
|
||||
unsigned int i = std::is_integral<K>::value ? hash & mask : hash % prime;
|
||||
unsigned int i = hash % prime;
|
||||
unsigned length = 0;
|
||||
unsigned step = 0;
|
||||
while (items[i].is_used ())
|
||||
@@ -295,7 +295,7 @@ struct hb_hashmap_t
|
||||
if (unlikely (!items)) return nullptr;
|
||||
|
||||
hash &= 0x3FFFFFFF; // We only store lower 30bit of hash
|
||||
unsigned int i = std::is_integral<K>::value ? hash & mask : hash % prime;
|
||||
unsigned int i = hash % prime;
|
||||
unsigned step = 0;
|
||||
while (items[i].is_used ())
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user