Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_API.h
| From: | Moriyoshi Koizumi | Date: | Sat, 04 Oct 2003 11:09:21 +0000 |
| Subject: | Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_API.h | ||
| References: | 1 | Groups: | php.zend-engine.cvs |
| Request: | Send a blank email to php-zend-engine-cvs+get-1876@lists.php.net to get a copy of this message | ||
Andi Gutmans <andi@zend.com> wrote:
> I think you should fix the places which call ZVAL_BOOL() incorrectly
> instead of slowing down the general case. I know it's quite negligible but
> it still makes more sense IMO.
Yes, it can be a matter of usage, but who can learn from its name that the
second parameter expects either one or zero and nothing else...? (Probably
I was just too silly though...) And I don't think it leads to noticeable
slowdown because it's often coupled by a ternary operator like (a ? 1: 0)
or a constant, either of which is likely to be reduced into a few machine
codes during a simple optimization process which is expectedly performed
by modern C compilers.
Moriyoshi