com php-src: Use fast zpp for ReflectionClass constructor: ext/reflection/php_reflection.c
| From: | Nikita Popov | Date: | Wed, 08 May 2019 15:06:00 +0000 |
| Subject: | com php-src: Use fast zpp for ReflectionClass constructor: ext/reflection/php_reflection.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-106077@lists.php.net to get a copy of this message | ||
Commit: e4e6820d103d82bece101597cdbca06f173cd64b
Author: Nikita Popov <nikita.ppv@gmail.com> Wed, 8 May 2019 17:04:28 +0200
Parents: 90e285f6fda679c18259e459c8585ebf284805b0
Branches: PHP-7.4 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=e4e6820d103d82bece101597cdbca06f173cd64b
Log:
Use fast zpp for ReflectionClass constructor
At this point zpp overhead makes up a significant part of this
function.
Changed paths:
M ext/reflection/php_reflection.c
Diff:
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c
index 7b7afa9..31c9fcc 100644
--- a/ext/reflection/php_reflection.c
+++ b/ext/reflection/php_reflection.c
@@ -3669,13 +3669,13 @@ static void reflection_class_object_ctor(INTERNAL_FUNCTION_PARAMETERS, int
is_ob
zend_class_entry *ce;
if (is_object) {
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "o", &argument) == FAILURE) {
- return;
- }
+ ZEND_PARSE_PARAMETERS_START(1, 1)
+ Z_PARAM_OBJECT(argument)
+ ZEND_PARSE_PARAMETERS_END();
} else {
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &argument) == FAILURE) {
- return;
- }
+ ZEND_PARSE_PARAMETERS_START(1, 1)
+ Z_PARAM_ZVAL(argument)
+ ZEND_PARSE_PARAMETERS_END();
}
object = ZEND_THIS;