com php-src: move the more common case up: Zend/zend_hash.c

From: Date: Thu, 23 Oct 2014 08:29:56 +0000
Subject: com php-src: move the more common case up: Zend/zend_hash.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-82473@lists.php.net to get a copy of this message
Commit: 53797ec1c998250488051d09059bca4dbfaf326e Author: Anatol Belski <ab@php.net> Thu, 23 Oct 2014 09:06:33 +0200 Parents: e91b669e237def8eb2cd43111c306a908b8f3c50 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=53797ec1c998250488051d09059bca4dbfaf326e Log: move the more common case up Changed paths: M Zend/zend_hash.c Diff: diff --git a/Zend/zend_hash.c b/Zend/zend_hash.c index fabdcd0..6644746 100644 --- a/Zend/zend_hash.c +++ b/Zend/zend_hash.c @@ -101,11 +101,11 @@ ZEND_API void _zend_hash_init(HashTable *ht, uint32_t nSize, dtor_func_t pDestru { /* Use big enough power of 2 */ #ifdef PHP_WIN32 - if (nSize >= 0x80000000) { + if (nSize <= 8) { + ht->nTableSize = 8; + } else if (nSize >= 0x80000000) { /* prevent overflow */ ht->nTableSize = 0x80000000; - } else if (nSize <= 8) { - ht->nTableSize = 8; } else { ht->nTableSize = 1U << __lzcnt(nSize); if (ht->nTableSize < nSize) {

« previous php.cvs (#82473) next »