Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 2. Coding for Performance > How Not to Optimize

How Not to Optimize

When people talk about optimizing an application, there is a temptation to immediately think of recoding the hot routines in assembly language or of reaching for one of the many books about performance optimization that talk about loop unrolling, invariant hoisting, and so on.

These do not represent the best place to start. In general, it is best to avoid optimizations that make the code less easy to read. The best approach is to make minimal changes to the source code or to select improved compiler flags.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint