what is a code motion
Answers
Answered by
4
Explanation:
As the name suggests, it involves movement of the code. The code present inside the loop is moved out if it does not matter whether it is present inside or outside. Such a code unnecessarily gets execute again and again with each iteration of the loop.
Answered by
3
Answer:
please follow and mark as brainliest
Explanation:
The "code motion" just means that the code is moved out of the loop as it won't have any difference if it is performed inside the loop repeatedly or outside the loop once. The compiler is taking the code that doesn't need to be in the loop and moving it outside of it for optimization purposes.
Similar questions