Date: Sun, 19 May 2013 06:44:26 +0200
Quote:
- SitePoint Forums - Questions
PHP Master SplFixedArray
http://www.sitepoint.com/forums/showthread.php?822807-PHP-Master-SplFixedArray&goto=newpost
Text:
The PHP Master book claims significant performance benefits for SplFixedArray over conventional arrays, ranging from 4.3x for large arrays up to 20x for very small ones (p.350).
I've been benchmarking the functions with the intention of using them, but I'm not seeing anywhere near this level of performance enhancement. Indeed for smaller arrays (up to 16 entires) the cycles needed to instantiate the class makes the approach less efficient. Even for larger arrays (32k+ entries) the benefit seems to level out at between 20-40% improvement, rather than the 300-400% claimed.
I'm wondering how the quoted benchmarked figures were compiled. And also whether anybody else has experience of using these functions and has managed to achieve the performance gains suggested.
I've been benchmarking the functions with the intention of using them, but I'm not seeing anywhere near this level of performance enhancement. Indeed for smaller arrays (up to 16 entires) the cycles needed to instantiate the class makes the approach less efficient. Even for larger arrays (32k+ entries) the benefit seems to level out at between 20-40% improvement, rather than the 300-400% claimed.
I'm wondering how the quoted benchmarked figures were compiled. And also whether anybody else has experience of using these functions and has managed to achieve the performance gains suggested.
Via FeedShow.com