Re: Performance improvements
| From: | William A. Rowe Jr. | Date: | Thu, 25 Mar 2010 01:42:14 +0000 |
| Subject: | Re: Performance improvements | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-47586@lists.php.net to get a copy of this message | ||
On 3/24/2010 6:41 PM, Stanislav Malyshev wrote:
> Hi!
>
>> Wouldn't it suffice to add a field for the hash value and a flag that
>> indicates its validity to zval instead of appending zend_literal
>> everywhere?
>
> Enlarging zval would be costly (the engine uses tons of zvals) and may
> also be more complicated to track (all zval operations now would also
> have to take care to set the flag right - what if we forget in some
> extension to set it right?). I think it's better not to mess with zval.
Is it time to consider that one zval isn't the answer to all puzzles?
Perhaps a light and heavy weight zval make sense here, where the light
zval makes assumptions about local scope, not reentrant/threadsafe, while
a heavier zval could be used for objects and meta objects with general
functionality including thread safety, redundancy, validity and scope??