Comments on: Benchmarking SPLFixedArray access speed http://www.idontplaydarts.com/2009/06/benchmarking-splfixedarray-access-speed/ A blog about Linux, Apache, MySQL, PHP and web application security Mon, 08 Mar 2010 05:17:39 +0000 http://wordpress.org/?v=2.8 hourly 1 By: Artur Ejsmont http://www.idontplaydarts.com/2009/06/benchmarking-splfixedarray-access-speed/comment-page-1/#comment-14367 Artur Ejsmont Wed, 03 Mar 2010 16:56:15 +0000 http://www.idontplaydarts.com/?p=103#comment-14367 That is confusing indeed. I think they wanted to create api so that people could start using it and at some stage actually implement it on static c array to gain a lot in performance. I cant believe they did not even hardwire count call?! i mean that one should be a constant should it not? and then return would take almost no time. any way i like the idea so i dont want to complain too much but it should have a better implementation thats true. what is the point of me using the new api if there is no performance improvement at all? Art That is confusing indeed.

I think they wanted to create api so that people could start using it and at some stage actually implement it on static c array to gain a lot in performance.

I cant believe they did not even hardwire count call?! i mean that one should be a constant should it not? and then return would take almost no time.

any way i like the idea so i dont want to complain too much but it should have a better implementation thats true. what is the point of me using the new api if there is no performance improvement at all?

Art

]]>
By: Scott http://www.idontplaydarts.com/2009/06/benchmarking-splfixedarray-access-speed/comment-page-1/#comment-11741 Scott Tue, 26 Jan 2010 03:53:13 +0000 http://www.idontplaydarts.com/?p=103#comment-11741 The reason for the surprising lack of performance improvement is that SplFixedArray doesn't implement a real C-like array underneath, it's still an associative array driven by a hash table just like Array(), *effectively nullifying any performance gains*, though as you mentioned, memory footprint is lower. It remains unexplained why the authors of the SPL chose such a pointless, no-gain implementation. I'm hoping that they address this in a future release. The reason for the surprising lack of performance improvement is that SplFixedArray doesn’t implement a real C-like array underneath, it’s still an associative array driven by a hash table just like Array(), *effectively nullifying any performance gains*, though as you mentioned, memory footprint is lower. It remains unexplained why the authors of the SPL chose such a pointless, no-gain implementation. I’m hoping that they address this in a future release.

]]>
By: Phil http://www.idontplaydarts.com/2009/06/benchmarking-splfixedarray-access-speed/comment-page-1/#comment-2442 Phil Tue, 06 Oct 2009 06:59:14 +0000 http://www.idontplaydarts.com/?p=103#comment-2442 Spelling mistakes corrected, thanks for pointing them out - spelling isnt my forté as you can probably tell.. http://xkcd.com/326/ Spelling mistakes corrected, thanks for pointing them out – spelling isnt my forté as you can probably tell.. http://xkcd.com/326/

]]>
By: Eric http://www.idontplaydarts.com/2009/06/benchmarking-splfixedarray-access-speed/comment-page-1/#comment-2441 Eric Tue, 06 Oct 2009 06:39:05 +0000 http://www.idontplaydarts.com/?p=103#comment-2441 And "it's". And “it’s”.

]]>
By: Eric http://www.idontplaydarts.com/2009/06/benchmarking-splfixedarray-access-speed/comment-page-1/#comment-2440 Eric Tue, 06 Oct 2009 06:38:33 +0000 http://www.idontplaydarts.com/?p=103#comment-2440 It's SplFixedArray not SPLFixedArray. It's also "lose", not "loose". It’s SplFixedArray not SPLFixedArray.
It’s also “lose”, not “loose”.

]]>
By: Phil http://www.idontplaydarts.com/2009/06/benchmarking-splfixedarray-access-speed/comment-page-1/#comment-67 Phil Wed, 29 Jul 2009 08:49:40 +0000 http://www.idontplaydarts.com/?p=103#comment-67 I've got the code on my laptop (which is at home at the moment) - I'll upload the code in about 12 hours or so - not sure how useful it will be to use for server tuning as it doesn't test things like disk IO but let me know how you get on :) Update: Just had a thought, if you wanted to get a better idea of how PHP performed on your server you could try timing the PHP test cases "make test" and seeing how long they take? this might give you a better over all view than using my benchmarks for SPLFixedArray (unless you just want to test SPLFixedArray) I’ve got the code on my laptop (which is at home at the moment) – I’ll upload the code in about 12 hours or so – not sure how useful it will be to use for server tuning as it doesn’t test things like disk IO but let me know how you get on :)

Update: Just had a thought, if you wanted to get a better idea of how PHP performed on your server you could try timing the PHP test cases “make test” and seeing how long they take? this might give you a better over all view than using my benchmarks for SPLFixedArray (unless you just want to test SPLFixedArray)

]]>
By: Jason http://www.idontplaydarts.com/2009/06/benchmarking-splfixedarray-access-speed/comment-page-1/#comment-66 Jason Tue, 28 Jul 2009 14:57:50 +0000 http://www.idontplaydarts.com/?p=103#comment-66 do you happen to have the code available that you used in this benchmark? want to do an apples to apples comparison and maybe some server tuning and this seems to be a good bench to base off of. Thanks!!! do you happen to have the code available that you used in this benchmark? want to do an apples to apples comparison and maybe some server tuning and this seems to be a good bench to base off of.

Thanks!!!

]]>
By: Robin http://www.idontplaydarts.com/2009/06/benchmarking-splfixedarray-access-speed/comment-page-1/#comment-10 Robin Sat, 06 Jun 2009 20:16:58 +0000 http://www.idontplaydarts.com/?p=103#comment-10 Cool, interesting stuff! I wonder how your experiments will compare to http://developer.studivz.net/2009/03/18/php-spl-data-structures-benchmark/ . Cool, interesting stuff! I wonder how your experiments will compare to http://developer.studivz.net/2009/03/18/php-spl-data-structures-benchmark/ .

]]>