Explain optimizing transformations, Computer Engineering

Assignment Help:

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.


Related Discussions:- Explain optimizing transformations

First order predicate logic-artificial intelligence, First Order Predicate ...

First Order Predicate Logic This is a more expressive logic because it builds on propositional logic by allowing us to use constants, predicates, variables, quantifiers and fun

Write a .net web service program, Question: (a) Give three typical use...

Question: (a) Give three typical uses of Web Services. (b) Describe the term WebService Behavior and list its advantages. (c) Explain how Proxy classes are used to acc

Name two special purpose registers, Name two special purpose registers. ...

Name two special purpose registers. Index register Stack pointer

What are the primary models of supply chain management, What are the primar...

What are the primary models of Supply Chain Management? Two Primary models of Supply Chain Management are illustrated below: a. Porter’s Value Chain Model and b. Supply

What are program-invisible registers, What are program-invisible registers?...

What are program-invisible registers? Ans: the local and global descriptor tables are found in the memory system. To access and specify the address of these tables, program inv

Unification, Unification: As just above this we have said that the rul...

Unification: As just above this we have said that the rules of inference for propositional logic detailed in the last lecture can also be required in first-order logic. Moreov

What is a virtual address, Q. What is a virtual address? Von Neumann ha...

Q. What is a virtual address? Von Neumann had suggested that execution of a program is possible only if program and data are residing in memory. In such a condition program len

Limitations of experts system, 1. It is hard even for a highly skilled ex...

1. It is hard even for a highly skilled experts to abstract good situational assessment when he is under time pressure. 2. Expert systems perform well with specific t

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd