com php-src: Avoid extra function call on hot path: Zend/zend_execute.c
| From: | Dmitry Stogov | Date: | Mon, 09 Jun 2014 11:41:29 +0000 |
| Subject: | com php-src: Avoid extra function call on hot path: Zend/zend_execute.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-78777@lists.php.net to get a copy of this message | ||
Commit: 7bf4fa69be02b4ae716c5277d4c65e7a4d5db250
Author: Dmitry Stogov <dmitry@zend.com> Mon, 9 Jun 2014 15:41:29 +0400
Parents: 8cfdf20ccf1a555264b67636826a2d9e9d35d8d0
Branches: phpng
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=7bf4fa69be02b4ae716c5277d4c65e7a4d5db250
Log:
Avoid extra function call on hot path
Changed paths:
M Zend/zend_execute.c
Diff:
diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c
index 95028ff..642f1e3 100644
--- a/Zend/zend_execute.c
+++ b/Zend/zend_execute.c
@@ -1111,9 +1111,10 @@ fetch_from_array:
long offset;
if (type != BP_VAR_UNSET && UNEXPECTED(Z_STRLEN_P(container) == 0)) {
-convert_to_array:
zval_dtor(container);
- array_init(container);
+convert_to_array:
+ ZVAL_NEW_ARR(container);
+ zend_hash_init(Z_ARRVAL_P(container), 8, NULL, ZVAL_PTR_DTOR, 0);
goto fetch_from_array;
}
if (dim == NULL) {