Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Explain optimizing transformations?

Optimizing transformations:

It is a rule for rewriting a segment of a program to enhance its execution efficiency without influencing its meaning. Usually used optimizing transformations are given below:

(a) Compile time evaluation: Execution efficiency can be enhanced by performing certain action given in a program through compilation itself. Constant folding is the important optimization of this type. While all operands in an operation are constants, the operation can be performed on compilation time.

For illustration: a: =3.141557/2 can be replaced through a:=1.570785 removing a division operation.

(b) Elimination of common subexpressions:

Common subexpressions are occurrences of expressions yielding similar value. For illustration: a:=b*c t: = b*c

λ: = b*c + 5.2      =>   a: = t

λ: = t + 5.2

(c) Dead code elimination: Code that can be omitted from a program without influencing its results is termed as dead code. For illustration: An assignment statement x: = < exp > constitutes dead code if the value assigned to x is not utilized in the program.

(d)Frequency and strength reduction:

Execution time of a program can be reduced through moving code from a part of programs that is executed very frequently to the other part of the program that is executed fewer times.

The strength reduction replaces the occurrence of a time consuming operation through an occurrence of a faster operation.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M9544541

Have any Question?


Related Questions in Computer Engineering

Discuss the role of insurance in healthcare delivery and

Discuss the role of insurance in healthcare delivery and productivity?

Question suppose the distance between two ends of an

Question : Suppose the distance between two ends of an Ethernet LAN with a transmission rate of R bps is d meters. Can you derive a formula to find the minimum frame size, L, needed for an Ethernet packet? Using this for ...

Question suppose alice bob and carol want to use secret key

Question : Suppose alice, bob and carol want to use secret key technology to authenticate each other. If they all use the same key, K, then bob would impersonate carol to alice. suppose instead that each had their own se ...

It has been argued that although there may be more claims

It has been argued that although there may be more claims when road conditions are slippery in the winter, this should not affect the average claim. Malpeque took a sample of 50 claims from the winter of 2018 and found t ...

Recall that one of the ways to randomize an algorithm that

Recall that one of the ways to randomize an algorithm that operates on an array is to "shuffle" the array -- i.e., randomly permute it. Give an algorithm that randomly permutes an input array A. What is the run-time of y ...

When is a subclass a subclasswhen programming or solving

When is a Subclass a Subclass When programming, or solving any sort of problem for that matter, abstraction plays a key role in the decision-making process. It allows you to remove irrelevant details in order to understa ...

1 write code in the method linearsearch in

1. Write code in the method linearSearch() in "SearchMethods"class which finds the element in an array using linear search approach and returns its index to the calling main method, otherwise it returns -1. 2. Write code ...

Question explain why you should always search the free

Question: Explain why you should always search the free space and slack space if you suspect person who deliberately delete file or information on a workstation that you are analyzing. The response must be typed, single ...

Question suppose you want to achieve a speedup of 90 times

Question : Suppose you want to achieve a speedup of 90 times faster with 100 processors. What percentage of the original computation can be sequential? Assume one byte data value is 1101, 1000(binary). When we decode the ...

Recursive algorithms help c programmingquestion create an

Recursive algorithms help C++ programming: question: Create an ADT that contains a fixed-size array that holds 20 integers (i.e., int array[20]; ) and the following member functions: A default constructor that initialize ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As