Too many developers take this too far, expecting the teams who optimize platforms & compilers to make up for their own inability to optimize their code. Some system limitations are inherent, good programmers need to understand those limitations and find solutions that work around them.
Optimizing the compiler or system tends to give incremental gains; optimizing your solution to the problem space gives order of magnitude gains. Some examples of what I mean by this:
Good point yes (and nice examples), perhaps I was looking at this too much from a lower level point of view (as in looking at the disassembly to see what the compiler actually does and trying to figure out if there's room to make it use intrinsics or vectorisation, reducing cache miss penalties, ..) whereas the improvements you mention sound more like common sense to me though I realize that really depends on one's background/experience.