Exit early during checkInvariants rather than do the O(N) loop.
This loop is useful for debugging arrays but is too slow for general use, so we'll just "return true" before it and leave it in place for offline use.
Esse commit está contido em:
@@ -323,6 +323,9 @@ bool HphpArray::checkInvariants() const {
|
||||
assert(m_hash);
|
||||
assert(m_hLoad >= m_size);
|
||||
size_t load = 0;
|
||||
return true;
|
||||
// The following loop is for debugging arrays only; it slows
|
||||
// things down too much for general use
|
||||
for (size_t i = 0; i <= m_tableMask; i++) {
|
||||
load += m_hash[i] != ElmIndEmpty;
|
||||
}
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário