mirror of
https://github.com/php/php-src.git
synced 2025-08-15 13:38:49 +02:00
Micro optimization
This commit is contained in:
parent
28ab2060ee
commit
feb22b24cf
1 changed files with 4 additions and 3 deletions
|
@ -1041,16 +1041,17 @@ static zend_always_inline void _zend_hash_del_el_ex(HashTable *ht, uint32_t idx,
|
|||
HT_HASH(ht, p->h | ht->nTableMask) = Z_NEXT(p->val);
|
||||
}
|
||||
}
|
||||
if (HT_IDX_TO_HASH(ht->nNumUsed - 1) == idx) {
|
||||
idx = HT_HASH_TO_IDX(idx);
|
||||
if (ht->nNumUsed - 1 == idx) {
|
||||
do {
|
||||
ht->nNumUsed--;
|
||||
} while (ht->nNumUsed > 0 && (UNEXPECTED(Z_TYPE(ht->arData[ht->nNumUsed-1].val) == IS_UNDEF)));
|
||||
}
|
||||
ht->nNumOfElements--;
|
||||
if (HT_IDX_TO_HASH(ht->nInternalPointer) == idx || UNEXPECTED(HT_HAS_ITERATORS(ht))) {
|
||||
if (ht->nInternalPointer == idx || UNEXPECTED(HT_HAS_ITERATORS(ht))) {
|
||||
uint32_t new_idx;
|
||||
|
||||
new_idx = idx = HT_HASH_TO_IDX(idx);
|
||||
new_idx = idx;
|
||||
while (1) {
|
||||
new_idx++;
|
||||
if (new_idx >= ht->nNumUsed) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue