4 ms·
There are some alternative data constructs in PHP, for example there are the SplFixedArray[1] and SplDoublyLinkedList[2] classes. The SPL data structures are m
by ihsw 14y ago
There are some alternative data constructs in PHP, for example there are the SplFixedArray[1] and SplDoublyLinkedList[2] classes.
The SPL data structures are meant to be faster and leaner implementations of common data structures that are usually created ad hoc in plain PHP.
[1] http://ca.php.net/splfixedarray http://ca.php.net/splfixedarray
[2] http://ca.php.net/manual/en/class.spldoublylinkedlist.php http://ca.php.net/manual/en/class.spldoublylinkedlist.php
- mgkimsal 14y agoSplFixedArray tends to use about 30% less memory overalll, based on some tests I did about a year ago with PHP 5.3
- dkhenry 14y agoThose are good and help a little, but the real issue isn't just the zval containers its zvals themselves. the Spl* structures are just proof that there is lots of room for improvement of the raw php data types.