Answered You can hire a professional tutor to get the answer.

QUESTION

The following C "optimizations" are said to improve the performance of embedded systems. In reality, some of them are useless or even...

The following C "optimizations" are said to improve the performance of embedded systems. In reality, some of them are useless or even counterproductive on certain architectures.

For each of the "optimizations" given, • Find out why it optimizes performance on some architectures

• Find out if there are any targets on which it does not improve performance, or decreases performance

• On the architectures on which it improves performance, how great is the improvement? (e.g., one instruction overall, one instruction per iteration of a loop, etc.) Is the improvement significant or trivial? Here are the "optimizations":

(a) Count down to zero, not up to N, in for() loops

(b) Avoid the % operation

(c) Use an 8-bit unsigned char whenever you have a value that you know won't go beyond 0-255 (e.g., some loop index variables)

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question