3 ms·
This is neat. Looking through it, looks like it makes regular numeric arrays faster as well via the flags. I wonder if the ->pDataPtr vs ->pData confusion has
by gopalv 12y ago
This is neat. Looking through it, looks like it makes regular numeric arrays faster as well via the flags.
I wonder if the ->pDataPtr vs ->pData confusion has been resolved.
I'm probably a few years behind, but a lot of my confusion working with hashes has been that pair of void* pointers.
- nikic 12y agoYes, pData and pDataPtr are no more. They have always been pretty pointless - both could have been dropped even retaining the rest of the previous implementation by using a struct hack layout. In the new implementation they aren't needed because it's specialized to zvals (our 99%-or-so use case).
- gopalv 12y agoNice work. I read deeper into the changeset and I like. The ->pDataPtr was the one thing behind 90% of the bugs I caused with exts (obviously stuff like the frozen_array hashtable handling was a completely odd-ball case). I read deeper and found that you also fixed the "void * *" in zend_hash_find(), which is another pain point in the old API - you cannot rely on the compiler type-checking at all. I no longer work with PHP, but avenge me for the hair I've lost over the IS_REF madness (copy_ctor vs separate_zval) :)