зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1455221 - Part 3: Increase size of table used by perfect hash function from 256 to 512. r=nika
This commit is contained in:
Родитель
7653728855
Коммит
7559921ade
|
@ -14,9 +14,9 @@ import time
|
|||
from collections import OrderedDict
|
||||
|
||||
# We fix the number of entries in our intermediate table used by the perfect
|
||||
# hashes to 256. This number is constant in xptinfo, allowing the compiler to
|
||||
# hashes to 512. This number is constant in xptinfo, allowing the compiler to
|
||||
# generate a more efficient modulo due to it being a power of 2.
|
||||
PHFSIZE = 256
|
||||
PHFSIZE = 512
|
||||
|
||||
def indented(s):
|
||||
return s.replace('\n', '\n ')
|
||||
|
|
|
@ -41,7 +41,7 @@ Phf_DoLookup(const void* aBytes, uint32_t aLen, const uint32_t* aIntr)
|
|||
}
|
||||
return Phf_DoHash(aBytes, aLen, mid) % sInterfacesSize;
|
||||
}
|
||||
static_assert(kPHFSize == 256, "wrong phf size?");
|
||||
static_assert(kPHFSize == 512, "wrong phf size?");
|
||||
|
||||
|
||||
////////////////////////////////////////
|
||||
|
|
|
@ -510,7 +510,7 @@ extern const ConstInfo sConsts[];
|
|||
extern const mozilla::dom::NativePropertyHooks* sPropHooks[];
|
||||
|
||||
// Perfect Hash Function backing data
|
||||
static const uint16_t kPHFSize = 256;
|
||||
static const uint16_t kPHFSize = 512;
|
||||
extern const uint32_t sPHF_IIDs[]; // Length == kPHFSize
|
||||
extern const uint32_t sPHF_Names[]; // Length == kPHFSize
|
||||
extern const uint16_t sPHF_NamesIdxs[]; // Length == sInterfacesSize
|
||||
|
|
Загрузка…
Ссылка в новой задаче