First make it work (get tests to pass).
Then make it right (clean it).
Then make it fast. (if it needs it).

Uncle Bob (via How to convince ‘performance guys’ to Clean Code – Google Groups )