Q. In compiler optimization, operator strength reduction uses mathematical identities to replace slow math operations with faster operations. Which of the following code replacements is an illustration of operator strength reduction? (Solved)

1. Replace P + P by 2 * P or Replace 3 + 4 by 7.

2. Replace P * 32 by P < < 5

3. Replace P * 0 by 0

4. Replace (P < <4) – P by P * 15

  • b. Replace P * 32 by P < < 5
Subscribe Now

Get All Updates & News