There is a shift in mindset required when making software right is not enough. Sure, make it right before fast, but know what it is like to make fast software because it is another set of skills. These five laws guide writing software that has to perform at scale. post
Be cautious of high level features of high level languages. Learn when you benefit from coding to the primitives that are probably well optimized in every language.
A language that can make your logic beautiful can probably make your optimizations beautiful too. Admit that performance is part of what you do.
Don't let your program slow down when it has too much work to do. Place a limit on everything and behave well when that limit is exceeded.
Model and measure the critical algorithms and data structures. Know when they exceed linear behavior and stay clear of those regions.
Don't hide problems by scaling out into today's excess capacity. Capacity will be in short supply tomorrow as will be the mental cycles to address problems left unattended
See also Reliable Software for NASA/JPL ten rules for safety critical code.