COMPILER DESIGN

ADVANCED TOPICS IN COMPILER DESIGN

CODE GENERATION FOR OBJECT ORIENTED LANGUAGES

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
efficient algorithms are good, we generally measure efficiency of an algorithm based on
A
TIME
B
RHYTHM
C
PATTERN
D
SPACE
Explanation: 

Detailed explanation-1: -The two main measures for the efficiency of an algorithm are time complexity and space complexity, but they cannot be compared directly. So, time and space complexity is considered for algorithmic efficiency. An algorithm must be analyzed to determine the resource usage of the algorithm.

Detailed explanation-2: -Counting the operations. One way to measure the efficiency of an algorithm is to count how many operations it needs in order to find the answer across different input sizes.

Detailed explanation-3: -Space efficiency-a measure of the amount of memory needed for an algorithm to execute. Asymptotic dominance-comparison of cost functions when n is large. That is, g asymptotically dominates f if g dominates f for all “large” values of n.

Detailed explanation-4: -An algorithm is considered efficient if its resource consumption, also known as computational cost, is at or below some acceptable level. Roughly speaking, ‘acceptable’ means: it will run in a reasonable amount of time or space on an available computer, typically as a function of the size of the input.

Detailed explanation-5: -Algorithm Efficiency The efficiency of an algorithm is mainly defined by two factors i.e. space and time. A good algorithm is one that is taking less time and less space, but this is not possible all the time. There is a trade-off between time and space. If you want to reduce the time, then space might increase.

There is 1 question to complete.