I’ve previously been talking about premature optimization. Today I thought I should illustrate how ridicules some of the stuff is by busting “echo is faster than print”. There’s a lot of people calming that this is true (1, 2, 3, 4 and a lot of others). Now to be clear, they are somewhat right about this. Echo is really faster than print, which it really should due to the fact that echo don’t return anything while print does. The problem and my point here however, is how much this difference really is. The answer is so tiny that you can forget actually measuring it in a real world application. There’s why: more…
Archive for » November, 2008 «
Saturday, November 01st, 2008 | Author: AHSauge
Donald Knuth once wrote that “premature optimization is the root of all evil”. I have to agree with him on that. One thing I’ve been dying to write about is the massive amount of crappy PHP optimization tips found on the net. Two examples of such is Reinhold Weber’s 40 Tips for optimizing your php code and chazzuka’s 63+ best practice to optimize PHP code performances. They do both have some good tips here and there, but in general this is just stupid tips, or more precise, premature optimization. There are reasons why such tips are bad. more…
Category: Optimization, PHP
| | 4 Comments

Recent Comments