Use An Efficient Architecture and Algorithms |
|
|
|
|
Written by Graham Stoney
|
|
The most efficient way to produce an efficient system is to design an architecture with efficiency in mind, use efficient algorithms and then code the system for readability. Then, profile the application and optimize the hot-spots.
There is usually a correlation between readability and efficiency, but it isn't absolute. Hand optimization can often make code less readable, and it takes valuable development time, so you don't want to optimize absolutely everything; just the hot-spots.
Using the simplest and most efficient architecture and algorithms will generally make the code more readable than a poorer design will, so you win both ways. You won't end up with an efficient system by hand-optimizing a mass of spaghetti though, so make sure your architecture is clean, elegant and efficient before you start.
|