Sometimes code just doesn’t scale.
One of my favorite tools to keep the code I am writing fast and scalable is xdebug. When I found that Zend Developer Zone did a four part series on xdebug, I felt compelled to pass it along. This article is specific to profiling code:
The above article also highlights some of the tools for analyzing cachegrind files. I’ve searched, but nothing exists to analyze cachegrind files on Mac OS X. If you know of something, post it here!
xDebug does much more than just profiling, so check it out.