Code Smell 20: Premature Optimization
Planning ahead of time needs a crystal ball no developer has.
Create a conclusive benchmark once the model is working.
Programmers waste enormous amounts of time worrying about, the speed of noncritical parts of their programs, and these attempts at efficiency actually have a strong negative impact when debugging and maintenance are considered. Donald Knuth
Use Test Driven Development technique. It always favors the simplest solution.
Weird data structures
This is a design smell so it can not be detected by mechanical tools (yet).
Defer performance decisions until functional models are mature enough.
Donald Knuth created/compiled the best/fastest algorithms and data structures. With great wisdom he warned us of abuse. Why do we think we are smarter than him?
Premature optimization is the root of all evil.
This article is part of the CodeSmell Series.