"Stuff" is pretty generic. Basic steps of writing performance-friendly
code:
1) Get the program working first (inefficiently, but functional).
2) Run a line-level performance monitoring tool (the good ones cost
money - expect to spend at least $400 for a halfway decent tool).
3) Look at the results of #2 and modify code to optimize out the most
inefficient portions.
4) Repeat process until satisfied.
No need for a book.
But if you still feel the need, game programming is the most intensive
type of optimization environment out there. Most applications can
afford to waste a bazillion clock cycles. Drop the framerate in a game,
though, for any reason, and users will start screaming.
- Code:
http://www.gamedev.net
is definitely worth checking out, but the principles are the same there.
They use the same tools and methodologies - just more aggressively.