Chapter 14. High-Performance Programming

IN BRIEF

Throughout the rest of this book, you will see how to improve the performance of your ASP.NET web applications and speed up your Windows Forms applications, your Web Services, and much more.

You can learn all the performance techniques in the world for each application type, but they won't help you very much if the code you write at the lowest level doesn't run as fast or use memory as efficiently as it could.

This chapter will demonstrate how to create high-performance C# code by showing you valuable techniques for memory management, dealing with the Garbage Collector, and speed techniques to improve the basic code that will be used in web applications and Windows applications alike.

WHAT YOU NEED

REQUIRED SOFTWARE.NET Framework SDK v1.1 Visual Studio .NET 2003 with C# installed
RECOMMENDED HARDWAREPC that meets .NET SDK minimum requirements
SKILLS REQUIREDC# and .NET familiarity

HIGH-PERFORMANCE PROGRAMMING AT A GLANCE

Introduction to Garbage Collection295  
 Garbage Collection Internals—Generations295Caveat: Nondeterministic Finalization Versus Deconstruction297
 Coding with the Garbage Collector in Mind296  
Memory and Class Management in the Common Language Runtime300  
 Boxing and Unboxing300Using the StringBuilder Class303
 Collections and Boxing302  
High-Performance Code: Best Practices305  
 Using Exceptions305Tip: Using AddRange on Collections307
 Chunky API Calls305
 Value Versus Reference Types306Jagged Versus Rectangular Arrays308
   For Versus Foreach308
   Utilizing Asynchronous I/O310
Summary310  
Further Reading310  

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.137.198.183