Do I always have to think about performance?

后端 未结 21 772
小蘑菇
小蘑菇 2021-02-04 04:16

I come from a DBA world and performance has always been an obsession. I am turning to development and I always think about performance, constantly, all the time.

Reading

21条回答
  •  一个人的身影
    2021-02-04 04:26

    The Knuth quote ("We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil") probably applies.

    When you drive your car, do you constantly and consciously check how close your car is to the curb? If you have enough experience driving a car you learn to know where its edges are and roughly how to drive and park it without hitting something close by.

    The analogous kind of intuition/experience for programming performance is important to gain through trial/error and questions, but you shouldn't have to spend your time constantly double-checking yourself.

提交回复
热议问题