12,093 views
4 4 votes

In compiler terminology reduction in strength means

  1. Replacing run time computation by compile time computation
  2. Removing loop invariant computation
  3. Removing common subexpressions
  4. replacing a costly operation by a relatively cheaper one

4 Answers

Best answer
10 10 votes

Answer is D

In software engineeringstrength reduction is a compiler optimization where expensive operations are replaced with equivalent but less expensive operations. The classic example of strength reduction converts "strong" multiplications inside a loop into "weaker" additions – something that frequently occurs in array addressing. 

selected by
1 1 vote

In compiler design strength reduction is a Machine Independent loop optimization technique.

There are expressions that consume more CPU cycles, time, and memory. These expressions should be replaced with cheaper expressions without compromising the output of expression. For example, multiplication (x * 2) is expensive in terms of CPU cycles than (x << 1) and yields the same result.

so answer is D.

edited by
0 0 votes
option A.it is constant folding we replace our variable with its constant value
so at compile time it will be execute(internally store in symbol table at the very first stage),so it saves time during runtime
option B.its our one of the loop optimization technique
option C.its part of available expression analysis calling common sub expression elimination
option D.yes in reduction in strength mean basically we replace high complexity operator into less time taking one
ie y=x*2 can be optimized as y=x+x
Answer:
Position:
Show:

Related questions

7 7 votes
5 answers 5 answers
11.2k
11.2k views
go_editor asked Jun 21, 2016
11,215 views
Which of the following statements about peephole optimization is False?It is applied to a small part of the codeIt can be used to optimize intermediate codeTo get the bes...
9 9 votes
3 answers 3 answers
9.5k
9.5k views
go_editor asked Jun 24, 2016
9,535 views
A symbol table of length $152$ is processing $25$ entries at any instant. What is occupation density?$0.164$$127$$8.06$$6.08$
7 7 votes
3 3 answers
4.3k
4.3k views
Isha Gupta asked Jun 19, 2016
4,274 views
Which variable does not drive a terminal string in grammar?$S \rightarrow AB$$A \rightarrow a$$B \rightarrow b$$B \rightarrow C$ABCS
5 5 votes
1 1 answer
4.5k
4.5k views
Satbir asked Jan 13, 2020
4,505 views
Which of the following is a type of a out-of-order execution, with the reordering done by a compilerloop unrollingdead code eliminationstrength reductionsoftware pipelini...