Designing for Performance

来源:互联网 发布:重生之数据人生 编辑:程序博客网 时间:2024/05/18 00:28
To summarize, do not strive to write fast programs — strive towrite good ones; speed will follow. Do think about performanceissues while you're designing systems and especially while you'redesigning APIs, wire-level protocols, and persistent data formats.When you've finished building the system, measure its performance.If it's fast enough, you're done. If not, locate the source of theproblems with the aid of a profiler, and go to work optimizing therelevant parts of the system. The first step is to examine yourchoice of algorithms: no amount of low-level optimization can makeup for a poor choice of algorithm. Repeat this process asnecessary, measuring the performance after every change, untilyou're satisfied.
0 0
原创粉丝点击