From: Andi Gutmans Date: Sun, 9 Aug 2009 04:46:02 +0000 (+0000) Subject: - Optimize slightly for common case - n!=4 X-Git-Tag: php-5.4.0alpha1~191^2~2825 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e4765438b8707ae9e681497dbdf454d286421dda;p=php - Optimize slightly for common case - n!=4 --- diff --git a/Zend/zend_alloc.c b/Zend/zend_alloc.c index 7c37fee005..f7b6ffd8fb 100644 --- a/Zend/zend_alloc.c +++ b/Zend/zend_alloc.c @@ -730,12 +730,14 @@ static inline unsigned int zend_mm_low_bit(size_t _size) /* {{{ */ unsigned int n; unsigned int index = 0; - do { - n = offset[_size & 15]; + n = offset[_size & 15]; + while (n == 4) { _size >>= 4; index += n; - } while (n == 4); - return index; + n = offset[_size & 15]; + } + + return index + n; #endif } /* }}} */