Readfile vs Include and echo vs print; don't bother

1246255057000 » Tagged as: religion

One of Google's own web masters has created a post at http://code.google.com/speed/articles/optimizing-php.html giving out several tips on how to optimize PHP scripts. Most of it is complete baloney and has been debunked by Gwynne Raskind via the Make the web faster group . What some people will do in the name of optimizing code is absolutely ridiculous. At most they will save a thousandth of a second after putting in 2 days of effort. Here is the proof : Should you optimize PHP? and Readfile vs Include

 

Both these articles were written quite a few years ago and Interestingly I have received a handful of hate mail from people who spend all their time optimizing code!

 

If you want your code to execute fast, design a good algorithm or better still look one up in a book. There is no substitute for it. If your app is connected to a database make sure the schema is properly designed. If you are retrieving data from a remote server (eg; a database or a RESTful API) use a cache. All this applies not just to PHP but to any language in existence on any platform.

comments powered by Disqus