Many code slowdowns occur in small, tight loops. If you know that's where your time is being spent, a micro-benchmark can help you optimize just that small bit of code.
Unit tests need to complete in a reasonable amount of time. It's rare indeed for me to write a unit test that takes longer than a second or two to execute, since I might have two or three hundred such tests or more in a test assembly.