Discussion
Strength reduction replaces an operation by
Answer: D
Correct answer: a cheaper one computing the same result
The classic case is replacing a multiplication in a loop by a repeated addition, since an induction variable growing by a fixed amount can be updated incrementally. Replacing a division by a shift where the divisor is a power of two is another. The result must be identical, which is why the transformation is delicate on signed and floating point types.
No comment is present. Be the first to comment.
Loading…
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development