Skip to: Site menu | Main content

» High Performance PHP

Thu, Dec 2nd 2004: Melbourne, Australia: Open Source Developers Conf

Jon's 3 Laws Of Robotics^H Optimisation

1. Don't pre-emptively optimise -- only do it when you need to in order to reach defined performance goals. Optimised code is (often) obfuscated code.

2. Don't guess which sections of your code need to be optimised. Measure with profiling tools such as APD or Xdebug, and run server benchmark tools with real data to give you hard figures.

3. Optimisation is a game of diminishing returns: go for the low-hanging fruit and keep going until it's “fast enough”.