I think modern hardware should be taught to programmers and it's a sad fact that many programmer don't even know how a computer works so I agree that education has a job to do here. But that doesn't imply that hardware specific optimizations should be the main focus of programming.
no, ill-constructed code has a lot of cache-missing, branch misprediction, zeroed 3OE, huge heap of garbage instructions in Asm-listing as well. De-facto hardware-independent algos don't & can't exist. it's very error of modern education to teach students abstract algos, written in pseudo-codes. real HPC is only hardware-friendly.