Fix folding for the new helper method.
Clarify comment in UPGRADING:
The performance on associative arrays would also improve,
as long as no offsets were unset (no gaps).
Packed arrays can have gaps.
Closes GH-4873.
[ci skip]
14. Performance Improvements
========================================
-- array_slice() on a packed array will no longer scan the whole array to find
+- array_slice() on an array without gaps will no longer scan the whole array to find
the start offset. This may significantly reduce the runtime of the function
with large offsets and small lengths.
/* Return a pointer to the end of the bucket array. */
return ht->arData + ht->nNumUsed;
}
+/* }}} */
/* {{{ proto array array_slice(array input, int offset [, int length [, bool preserve_keys]])
Returns elements specified by offset and length */