engineering recuitment NIC NIELIT Scientist B 2023 Mock Test Compiler Design Code Optimization Strength Reduction
Which of the following code replacements is an example of operator strength reduction?
1
Replace P^2 by P*P
2
Replace P*16 by P ≪ 4
3
Replace pow(P, 3) by P*P*P
4
Replace (P ≪5) – P by P*3