Two ways to write better programs:
Make best use of language
- Code Complete by Steve McConnell
- Effective C++
- Exceptional C++
profile your application
- Identify what areas of code are taking how much time
- See if you can use better data structures/ algorithms to make things faster
There is not much language specific optimization one can do - it is limited to using language constructs (learn from #1). The main benefit comes from #2 above.