You are quite right Udo,
Proper optimization has to analyze and optimize the structure first
Very true, sometimes optimization is not optimization but a completely different algorithm/strategy, as the optimization depends very much on the context.
e.g. sorting is a well known problem, but depending on your dataset and its usage different sorting algorithms perform better - QuickSort -