]> granicus.if.org Git - php/commit
Add zend_hash_splice
authorNikita Popov <nikic@php.net>
Tue, 8 Apr 2014 21:24:52 +0000 (23:24 +0200)
committerNikita Popov <nikic@php.net>
Wed, 9 Apr 2014 10:31:21 +0000 (12:31 +0200)
commit22d3eb3117b1b5c484152c9fec5a74b0e95024ea
treeddedf440c9aad90230b4c65077a3ccb76fb96f68
parent1aa8719e32663fbfcad9668364fbac0bc415b678
Add zend_hash_splice

This implements the original functionality of php_splice, but
as an in-place operation, thus avoiding copying the HT.

This is much faster (~10x) if the splice removes a small portion
of the array and doesn't insert many elements.
Zend/zend_hash.c
Zend/zend_hash.h
ext/standard/array.c
ext/standard/php_array.h