Useful benchmarking information at GarfieldTech

I found and wanted to the share the following link, which contains a lot of useful benchmarking stats.  I’ll admit, I was surprised by a lot of these, and didn’t realize how much slower some of these calls are.

http://www.garfieldtech.com/blog/magic-benchmarks

At the same time, while it’s true to say it takes longer to use one method over another, it’s worth keeping in mind that in most cases the time spent over 2 million iterations was still around three seconds or less.  A three second cost would mean .0015 millisecond cost each, on average.  If it’s not something you’re likely to do thousands of times (call_user_func), you’re looking at a completely reasonable cost.  If you’re doing it more than that, you might want to consider refactoring your code to do it less.

This entry was posted in PHP, Web Development and tagged , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>