Optimising code without taking into effect the context it runs in is what makes it premature. For instance, the complexity of the calling code, or even some situation where it will never matter in practice (efficiently sorting UI elements, which must be few to be relevantly called UI).
And there is early optimisation, when you know upfront the hill is steep because of the sheer amount of calculation involved in the very nature of the project (gamedev, big data, etc). And this can lead to low level optimizations (e.g McCarmack's fast inverse square root) or architectural measures (distributing code accross computers).
And there is early optimisation, when you know upfront the hill is steep because of the sheer amount of calculation involved in the very nature of the project (gamedev, big data, etc). And this can lead to low level optimizations (e.g McCarmack's fast inverse square root) or architectural measures (distributing code accross computers).
Premature Architecture ?