Questions

As in previous chapters, here are some questions so that you can test your understanding of the discussed topics:

  1. What did Linus say about C++ performance?
  2. What is an arena?
  3. What are PGO, FDO, LTO, LTCG, and WPO and what do they have in common?
  1. Have you looked into the compiler optimization example code from this book? Do you know what scalar replacement of aggregates is now?
  2. What do you think? How big is the overhead of a function call?
  3. What is dead stack pinning? Wasn't it a movie? Or was that dead stack walking?
  4. What is RTTI and is it expensive or not?
  5. What would change in the mutatingFunc() example discussed in the section about compiler optimization tricks, if it were defined in the same compilation unit?
  6. What is register pressure? Hint—it has to do with one of a compiler's main tasks, that is, register allocation.