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?

  • (A) Replace P + P by 2 * P or Replace 3 + 4 by 7.
  • (B) Replace P * 32 by P < < 5
  • (C) Replace P * 0 by 0
  • (D) Replace (P < <4) – P by P * 15
πŸ’¬ Discuss
βœ… Correct Answer: (B) Replace P * 32 by P < < 5

You must be Logged in to update hint/solution

πŸ’¬ Discussion

πŸ“Š Question Analytics

πŸ‘οΈ
360
Total Visits
πŸ“½οΈ
3 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
92%
Success Rate