Get Thinking

A detailed discussion of these questions can be found in the "Appendix A" section on page 510.

Mull It Over

  1. Optimization is a process of making trade-offs—sacrificing one quality of code for another desirable quality. Describe the kinds of trade-offs that lead to a performance increase.

  2. Look at each of the optimization alternatives listed in "Why Not Optimize?" on page 202. Describe what trade-offs are being made, if any.

  3. Explain these terms and their exact relationship:

    • Performance

    • Efficiency

    • Optimized

  4. What are the likely bottlenecks in a slow program?

  5. How can you avoid the need to optimize? What methods will prevent you from writing inefficient code?

  6. How does the presence of multiple threads affect optimization?

  7. Why don’t we write efficient ...

Get Code Craft now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.