From: Sterling Hughes Date: Wed, 21 May 2003 18:46:34 +0000 (+0000) Subject: optimize loops. The check only exists for integers because that's the more X-Git-Tag: RELEASE_1_0_2~649 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5619166fe4b97404ead038b5485f33c56d21885f;p=php optimize loops. The check only exists for integers because that's the more common optimization, and you actually lose performance if you check for a double too (wierd but true). --- diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index 8915ca90a4..f89d119fc5 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -144,7 +144,9 @@ ZEND_API void convert_scalar_to_number(zval *op TSRMLS_DC) #define zendi_convert_scalar_to_number(op, holder, result) \ if (op==result) { \ - convert_scalar_to_number(op TSRMLS_CC); \ + if (op->type != IS_LONG) { \ + convert_scalar_to_number(op TSRMLS_CC); \ + } \ } else { \ switch ((op)->type) { \ case IS_STRING: \