Volker Dusch's Blog: Never trust other peoples benchmarks - A recent example (exceptions)
Note: This article was originally published at PHPDeveloper on 20 January 2012.
Some days ago there was a blog post regarding php exception performance in 5.4 and the numbers got reported all over the place. The actually numbers are secondary. The main point is: Don't trust "random" stuff on the Internet when thinking about improving your application performance. You always need to measure things for your self and take care doing so! I've initially trusted the benchmark myself and disgraced the whole post saying: "Well yes, exceptions are slower than if statements but nice that they got faster".
He includes some results with a bit more standardized testing - one run with both 5.3 and 5.4 using XDebug and another with it turned off for both. His results make sense, if you think about them:
So what we learn from that? Running stuff with debugging tools is slower than not doing that. That's why we don't use xDebug in production.