summaryrefslogtreecommitdiff
path: root/Zend/zend_hash.h
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2015-04-24 13:00:56 +0300
committerDmitry Stogov <dmitry@zend.com>2015-04-24 13:00:56 +0300
commitef36d8a91ee78f4027dd4c4642196ba2dd951200 (patch)
treee9447c6e9dd6ca0764165c6ee3ef1ce06a5a5a7a /Zend/zend_hash.h
parente881017a7556061a8cff084bc823319270d4044e (diff)
downloadphp-git-ef36d8a91ee78f4027dd4c4642196ba2dd951200.tar.gz
Optimized zend_hash_rehash(), added some exoectations to generate better code
Diffstat (limited to 'Zend/zend_hash.h')
-rw-r--r--Zend/zend_hash.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/Zend/zend_hash.h b/Zend/zend_hash.h
index 419b26149e..2687ce2e87 100644
--- a/Zend/zend_hash.h
+++ b/Zend/zend_hash.h
@@ -726,7 +726,7 @@ static zend_always_inline void *zend_hash_get_current_data_ptr_ex(HashTable *ht,
if (indirect && Z_TYPE_P(_z) == IS_INDIRECT) { \
_z = Z_INDIRECT_P(_z); \
} \
- if (Z_TYPE_P(_z) == IS_UNDEF) continue;
+ if (UNEXPECTED(Z_TYPE_P(_z) == IS_UNDEF)) continue;
#define ZEND_HASH_REVERSE_FOREACH(_ht, indirect) do { \
uint _idx; \
@@ -736,7 +736,7 @@ static zend_always_inline void *zend_hash_get_current_data_ptr_ex(HashTable *ht,
if (indirect && Z_TYPE_P(_z) == IS_INDIRECT) { \
_z = Z_INDIRECT_P(_z); \
} \
- if (Z_TYPE_P(_z) == IS_UNDEF) continue;
+ if (UNEXPECTED(Z_TYPE_P(_z) == IS_UNDEF)) continue;
#define ZEND_HASH_FOREACH_END() \
} \