As Knuth said,
We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil.
When programming, a number of parameters are vital. Among these are:
Optimisation (going for performance) often comes at the expense of other parameters, and must be balanced against the "loss" in these areas.
When you have the option of choosing well-known algorithms that perform well, the cost of "optimising" up-front is often acceptable.