Almost anywhere you will find that your first step when coding is making it to work and only later worry about performance. I only half agree.
It's true that your code must work, otherwise you'll have nothing. But while you're coding you must always keep in mind the performance of this code. I don't mean that you should invest extra time trying to make your code faster, you just need to keep in mind some general recommendations about performance that will help you.
For Java developers, this is a good checklist, but most of them are valid for almost any language:
- Do not recalculate constants inside a loop.
- Reduce the number of network operations by returning complete results rather than smaller intermediate results.
- Reduce the distance between objects during operation. It is better to perform complex operations locally.
- Avoid object creation and destruction except as necessary. Reuse existing objects.
- Use open source frameworks which are established and tested.
Find a list of performance check points for your favorite language and keep it in mind.
See you soon.