com php-src: Micro optimization: ext/standard/array.c

From: Date: Sat, 20 Jun 2015 02:52:58 +0000
Subject: com php-src: Micro optimization: ext/standard/array.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-87396@lists.php.net to get a copy of this message
Commit: f75308eda1b432ddf3d81e5378eceebf44658ffb Author: Xinchen Hui <laruence@php.net> Sat, 20 Jun 2015 10:48:18 +0800 Parents: dc72b70b7e3b2234d9dd3846ab184676cb992982 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=f75308eda1b432ddf3d81e5378eceebf44658ffb Log: Micro optimization Changed paths: M ext/standard/array.c Diff: diff --git a/ext/standard/array.c b/ext/standard/array.c index a8e56c0..fdfb910 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -2750,7 +2750,7 @@ PHPAPI int php_array_replace_recursive(HashTable *dest, HashTable *src) /* {{{ * } /* }}} */ -static void php_array_merge_or_replace_wrapper(INTERNAL_FUNCTION_PARAMETERS, int recursive, int replace) /* {{{ */ +static inline void php_array_merge_or_replace_wrapper(INTERNAL_FUNCTION_PARAMETERS, int recursive, int replace) /* {{{ */ { zval *args = NULL; zval *arg; @@ -2989,7 +2989,7 @@ PHP_FUNCTION(array_values) /* Go through input array and add values to the return array */ ZEND_HASH_FILL_PACKED(Z_ARRVAL_P(return_value)) { ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(input), entry) { - if (Z_ISREF_P(entry) && Z_REFCOUNT_P(entry) == 1) { + if (UNEXPECTED(Z_ISREF_P(entry) && Z_REFCOUNT_P(entry) == 1)) { entry = Z_REFVAL_P(entry); } Z_TRY_ADDREF_P(entry);

« previous php.cvs (#87396) next »