Hacker News new | past | comments | ask | show | jobs | submit login

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

[2] http://ca.php.net/manual/en/class.spldoublylinkedlist.php




SplFixedArray tends to use about 30% less memory overalll, based on some tests I did about a year ago with PHP 5.3


Those 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: