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.
pull/4244/head
Behdad Esfahbod 1 year ago
parent c1b75f5ff0
commit 4a93576bca
  1. 4
      src/hb-map.hh

@ -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 ())
{

Loading…
Cancel
Save