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

What is difference between ram and fifo, What is difference between RAM and...

What is difference between RAM and FIFO? FIFO certainly does not have address lines. It is stands for first in and first out. It is an algorithm based method. It is used to s

Explain list directive in assembly language, Q. Explain list directive in a...

Q. Explain list directive in assembly language? A list directive causes assembler to generate an annotated listing on printer, video screen, disk drive or any combination of th

What is incidence matrix, Incidence Matrix: - This is the incidence matrix ...

Incidence Matrix: - This is the incidence matrix for an undirected group. For directed graphs, the vertex from where an edge is originating will have +1 and the vertex where the ed

What do you mean by manual assembly, Q. What do you mean by Manual Assembly...

Q. What do you mean by Manual Assembly? It was an old method which required the programmer to translate every opcode in its numerical machine language representation by search

Number conversion, (a) Convert the following number to single precision IEE...

(a) Convert the following number to single precision IEEE 754 based on the procedure described in class and in the notes. Express the result in hexadecimal. Show all your work.

Operations of the web, Operations of the Web mainly depend on hypertext as ...

Operations of the Web mainly depend on hypertext as its means of interacting with users. But what is hypertext? Hypertext as such is the same as regular text that is it can be read

Processes vs threads, One might argue that in general processes are more ?e...

One might argue that in general processes are more ?exible than threads. For one thing, they can live in two different machines, and communicate via sockets; they are easy to spawn

Compare hypertext versus hypermedia, Compare hypertext versus hypermedia.  ...

Compare hypertext versus hypermedia.  Hypertext is basically similar as regular text - it can be stored, read, searched, or edited - with a significant except ion: hyper text h

Define word length, Define word length?  Every group of n bits is refer...

Define word length?  Every group of n bits is referred to as a word of information and n is known as the word length.

Explain magnetic read and write mechanisms, Q. Explain Magnetic Read and Wr...

Q. Explain Magnetic Read and Write Mechanisms? Data are recorded on and then retrieved from disk via a conducting coil called the head. In numerous systems there are two heads,

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