Non ironically: In practice it mostly boils down to experience, writing relatively efficient software should not take much more time or even long term accelerate development (less time to wait) (I don't talk about the last few percent of compiler reverse-engineered SIMD optimisation that takes time...)
I detest the state modern web development has downspiraled to. I bet I'm faster writing a big application in Vanilla js vs using the abomination that Next.Js has come to...