“We should forget about small efficiencies, say about 97% of
the time: Premature optimization is the root of all evil.”
Throughout this volume, algorithms have been presented within a context of quality, memory, and performance trade-offs. In this chapter we will discuss performance problems and opportunities that are not associated with particular algorithms. Bottleneck detection and optimization are the focus, starting with making small, localized changes, and ending with techniques for structuring an application as a whole to take advantage of multiprocessing capabilities.
As we saw in Chapter 2, the process of rendering an image is based on a pipelined architecture with four conceptual ...