CH2 application performance

2.1 INTRODUCTION

  Performance program (program performance): refers to the size and the time required for a program. Analysis method of performance analysis (performance analysis), methods using experimental points measured performance (performance measurement).

  Space complexity of the program (space complexity): refers to the size of memory to run a program requires completion. Spatial complexity can be used:

  * Program memory size distribution;

  * Confirm whether there is enough memory to run the program;

  * You can use the time complexity of estimating the upper limit of the size of a program that can solve the problem.

  Complexity time of the program (time complexity): End Run time required for the program.

2.2 spatial complexity 

  The space required for the program includes the following sections:

  * Instruction space (instruction space): After storage space program instruction after compiling need.

  * Data space (data space): storage of all values ​​of constants and variables space required. It can be divided into two parts:

  1) storing constants and simple variables.

  2) storage complex variables, including the space required and the spatial data structure dynamically allocated.

  * Environmental stack space (environment stack space): used to save information needed to run the restore function when the call returns. As func1 call func2, you will need to save the address fun1 continue to execute instructions at the end of func2.

  The compiler can optimize the code and execution time provided for the user

Guess you like

Origin www.cnblogs.com/Vince-Wu/p/12369991.html
Recommended