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

2. Coding for Performance

This chapter discusses how to design and write programs with performance in mind. Serial performance remains important even for parallel applications. There are two reasons for this. Each thread in a parallel application is a serial stream of instructions. Making these instructions execute as fast as possible will lead to better performance for the entire application. The second reason is that it is rare to find a parallel application that contains no serial code. As the number of threads increases, it is the performance of the serial sections of code that will ultimately determine how fast the application runs.

There are two approaches for improving the performance of an application. The first, which is unfortunately typical of many projects, is that performance is the problem to be solved once the program is functionally correct. The alternative approach is that performance is considered as one of the up-front specifications for the application. Taking performance into consideration in the initial phases of application design will lead to a better final product. This chapter discusses where performance can be gained (or lost) and how early consideration of performance can lead to an improved product.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

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

  

Start a Free 10-Day Trial


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