Bug 1455221 - Part 3: Increase size of table used by perfect hash function from 256 to 512. r=nika

This commit is contained in:
Jorg K 2018-04-20 10:13:00 +03:00
Родитель 7653728855
Коммит 7559921ade
3 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -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