People are talking about dynamic optimization in compilers.What does it mean? Can anyone give me a fair idea about it?
People are talking about dynamic optimization in compilers.What does it mean? Can anyone give
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Static optimization is based on the program code itself. Alternatively, dynamic optimization is based on code execution results. For example, having a long switch statement in C/C++, it would be possible to optimize it by changing case operators order. To do this, it is necessary to run the program many times and keep this switch operator statistics.
Some modern compilers contain such optimization framework, which allows to run the program and save its runtime statistics. Then the program code is optimized by using this statistics.
See, for example, VC++ Profile-Guided Optimizations:
http://msdn.microsoft.com/en-us/library/e7k32f4k.aspx