Re: Exploit fully packed array/hash property
| From: | Andrea Faulds | Date: | Wed, 19 Oct 2016 13:25:31 +0000 |
| Subject: | Re: Exploit fully packed array/hash property | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-96483@lists.php.net to get a copy of this message | ||
Hi Dmitry,
Dmitry Stogov wrote:
The main API/BC changes implementation: https://gist.github.com/dstogov/429fcc2ba051fdcf774a310c5d6db00d All tests passed. Performance is not affected (+1 CPU instruction on each *new* element insertion) If it's OK and allowed, after committing this, I'll add few usages of these new defines for optimization. All of them are going to be self-containing changes to particular functions implementation.These proposed HT_HAS_STRING_KEYS_ONLY() and HT_HAS_LONG_KEYS_ONLY() macros look pretty useful. My patch to fix up array/object casts' handling of numeric strings could make use of these, for instance. I would be glad to see this merged. Do you think HT_IS_FULLY_PACKED() would benefit from an explanatory comment? Thanks! -- Andrea Faulds https://ajf.me/