Slides link: many practices also can be applied to other environments as well.
Summary:
- Premature optimization is root of all evil (ahem)
- Avoid common misunderstandings: a. More code does not necessarily mean slower performance.
- We can always throw more hardware at it
- Optimize, but don't touch the code: it's better to start from optimizing portions that can be changed without harming code integrity. a. Example: memoizing expensive function calls or SQL queries with memcache
- Use opcode caches (PHP specific)
- Optimize database before code.
- Always profile before optimizing.
- Pay attention to output control.
- Compile your binaries: Frequently you can see 15~20% speedups.
I should say that the last one was rather unexpected; so that's why people use Gentoo, hmm.


