This question is about function inlining. It is a common optimisation and most C implementations have directives for it. How can it adversely affect computation time? What sort of functions would be ideal candidates for inlining? (Hint: remember computer design lectures)
What is the scope of peephole optimisations? What are the other class of optimisations and rank them in difficulty with brief justification to your ranking. Give five examples of peephole optimisations.
From Mogensen (2009, chap. 13), solve Exercise 13.2.
2021/4/3 only part (a)
2018/4/3 only part (g)
Mogensen, T.Æ., 2009. Basics of compiler design. Torben Ægidius Mogensen.