99.999% of performance issues in development are related to the abstract model, and not the underlying implementation details. Things such as searching in a big unordered list, repeating the same work, stupid SQL queries ect.
The way I usually follow it is
1) Is this OK? For example It is only called once in the code in an error path?
2) Did I do something silly? For example, I left in some extra debug code.
3) is the code doing something silly? For example extra work, dragging in extra data that is not needed?
4) is the code written in a way that causes extra work, re-init on inner loop, loop hoisting, etc
5) Is there a better algorithm for this? Binary search vs linear?
6) is the code doing too many things at once. De-serialize it re-serialize it
7) Is there a better abstraction for this? Monolith code vs microservice?
8) Is there any compiler switches that are 'easy' wins? Packing, -O2, etc? Usually not.
9) What sort of memory arch does this machine have? It varies between machines even for the x86 world. For example if I rearrange my memory structures do I use less cache and emit less code. The cache line on this box is x bytes and on that box is y bytes. Some languages do not lend themselves well to this one due to the way their VM/ISA is written.
10) is there some asm that would help? usually not.
Usually 1-7 are all you need. If you get all the way to 10 you are in the deep end for most things.
Big O is good for many things. But in reality big O is O(N)+C where the C can get you. That is where the later steps help. But usually you can totally ignore it. Most of the big wins I get are just from flipping out a bad search for a O(log(n)) search, or removing 'extra' code.
Oh I agree. It is just that +C bit. What happens when your O(nLog(n)) basically just trashes the cache because of your data structures? Yet maybe something 'worse' would run better because of the way cache works? That +c bit can sometimes turn into its own big O. It is a nasty little gotcha when it does happen.
It is a good framework to get you in the ballpark of the correct thing. Even usually 99% of the time it is right. But sometimes the arch bites back due to your data.
Only because most software "engineers" don't give two shits about the actual user experience of their glacially slow over-engineered garbage.