Re: Optimizing array_reverse for packed hash tables (when preserve_keys=false)

php.internals

Benjamin Coutu

10 years ago
Hi Xinchen, The code I used was simply derived from the code of the array_slice implementation (totally analogous). Maybe your suggested changes (check HASH_FLAG_PACKED fist + Z_TRY_ADDREF) should be carried over to array_slice then as well. Please go ahead and commit a patch, I'd prefer to stick to reviewing for now. Thanks, Ben