正在加载图片...
general and C++performance in particular.What are those factors?The first level of performance classification is given in Figure 1. Figure 1.High-level classification of software performance Software Performance Design Coding At the highest level,software efficieny is determined by the efficiency of two main ingredients m's high-level design To fix perfo ance problems at efficiencyd the program's big picture Totent this that level you must understand the pr No amount o of coding an provide shelter f a bad design to look very far into a code fragme This high-level classification can be broken down further into finer subtopics.as shown in Figure 2 Figure 2.Refinement of the design performance view Design Algorithms Data Stuctures Program Decompositior Design efficiency is broken down further into two items: rithmsad data svrman alorith it mng to ms and of data rching.sorting.comp reduced to that aspect alone is inaccurate.The efficieny of algorithms and data structures is necessary but not sufficient:By itself,it does not guarantee good overall program efficiency.ix general and C++ performance in particular. What are those factors? The first level of performance classification is given in Figure 1. Figure 1. High-level classification of software performance. At the highest level, software efficiency is determined by the efficiency of two main ingredients: • Design efficiency This involves the program’s high-level design. To fix performance problems at that level you must understand the program’s big picture. To a large extent, this item is language independent. No amount of coding efficiency can provide shelter for a bad design. • Coding efficiency Small- to medium-scale implementation issues fall into this category. Fixing performance in this category generally involves local modifications. For example, you do not need to look very far into a code fragment in order to lift a constant expression out of a loop and prevent redundant computations. The code fragment you need to understand is limited in scope to the loop body. This high-level classification can be broken down further into finer subtopics, as shown in Figure 2. Figure 2. Refinement of the design performance view. Design efficiency is broken down further into two items: • Algorithms and data structures Technically speaking, every program is an algorithm in itself. Referring to “algorithms and data structures” actually refers to the well-known subset of algorithms for accessing, searching, sorting, compressing, and otherwise manipulating large collections of data. Oftentimes performance automatically is associated with the efficiency of the algorithms and data structures used in a program, as if nothing else matters. To claim that software performance can be reduced to that aspect alone is inaccurate. The efficiency of algorithms and data structures is necessary but not sufficient: By itself, it does not guarantee good overall program efficiency
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有