adplus-dvertising
frame-decoration

Question

In compiler optimization, operator strength reduction uses mathematical identities to replace slow math operations with faster operations. Which of the following code replacements is an illustration of operator strength reduction?

a.

Replace P + P by 2 * P or Replace 3 + 4 by 7

b.

Replace P * 32 by P<<5

c.

Replace P * 0 by 0

d.

Replace (P<<4) – P by P * 15

Answer: (b).Replace P * 32 by P<<5

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. In compiler optimization, operator strength reduction uses mathematical identities to replace slow math operations with faster operations. Which of the following code replacements...

Similar Questions

Discover Related MCQs

Q. Which of the following are the principles tasks of the linker?

I. Resolve external references among separately compiled program units.
II. Translate assembly language to machine code.
III. Relocate code and data relative to the beginning of the program.
IV. Enforce access-control restrictions on system libraries.

Q. Which of the following is false regarding the evaluation of computer programming languages?

Q. Which of the following statements is false?

Q. System calls are usually invoked by using:

Q. The ............... transfers the executable image of a C++ program from hard disk to main memory.

Q. The family of context sensitive languages is ................. under union and ................. under reversal.

Q. Which is the correct statement(s) for Non Recursive predictive parser?

S1: First(α) = {t | α => * t β for some string β } => *tβ
S2: Follow(X) = { a | S => * αXa β for some strings α and β }

Q. From the point of view of the programmer, what are the major advantages of using a high-level language rather than internal machine code or assembly language ?

Q. The scheme of which interpreter translates the source program is known as

Q. Portable program means

Q. Object modules generated by assembler that contains unresolved external references are resolved for two or more object module by a/an

Q. A special software that is used to create a job queue is called

Q. Which of the following permanent database that has an entry for each terminal symbol ?

Q. In which way(s) a macroprocessor for assembly language can be implemented ?

Q. Which of the following can be accessed by transfer vector approach of linking ?

Q. Block or Buffer caches are used to

Q. Object code is the output of ……………

Q. ‘Macro’ in an assembly level program is …………..

Q. Grammar of the programming is checked at …………… phase of compiler.

Q. Macro-processors are ………….