Code Optimisation Questions
Loop-invariant code motion is a technique used in code optimization to improve the performance of loops. It involves identifying and moving code that does not change within the loop outside of the loop, thereby reducing the number of times it is executed. This optimization technique helps to eliminate redundant computations and improve the overall efficiency of the loop.