Introduction to the Second Edition

The fundamentals of .NET performance have not changed much in the years since the first edition of Writing High-Performance .NET Code. The rules of optimizing garbage collection still remain largely the same. JIT, while improving in performance, still has the same fundamental behavior. However, there have been at least five new point releases of .NET since the previous edition, and they deserve some coverage where applicable.

Similarly, this book has undergone considerable evolution in the intervening years. In addition to new features in .NET, there were occasional and odd omissions in the first edition that have been corrected here. Nearly every section of the book saw some kind of modification, from the very trivial to significant rewrites and inclusion of new examples, material, or explanation. There are too many modifications to list every single one, but some of the major changes in this edition include:

  • Overall 50% increase in content.
  • Fixed all known errata.
  • Incorporated feedback from hundreds of readers.
  • New Foreword by .NET performance architect Vance Morrison.
  • Dozens of new examples and code samples throughout.
  • Revamped diagrams and graphics.
  • New typesetting system for print and PDF editions.
  • Added a list of CLR performance improvements over time.
  • Described more analysis tools.
  • Significantly increased the usage of Visual Studio for analyzing .NET performance.
  • Numerous analysis examples using Microsoft.Diagnostics.Runtime (“CLR MD”).
  • Added more content on benchmarking and used a popular benchmarking framework in some of the sample projects.
  • New sections about CLR and .NET Framework features related to performance.
  • More on garbage collection, including new information on pooling, stackalloc, finalization, weak references, finding memory leaks, and much more.
  • Expanded discussion of different code warmup techniques.
  • More information about TPL and a new section about TPL Dataflow.
  • Discussion of ref-returns and locals.
  • Significantly expanded discussion of collections, including initial capacity, sorting, and key comparisons.
  • Detailed analysis of LINQ costs.
  • Examples of SIMD algorithms.
  • How to build automatic code analyzers and fixers.
  • An appendix with high-level tips for ADO.NET, ASP.NET, and WPF.
  • …and much more!

I am confident that, even if you read the first edition, this second edition is more than worth your time and attention.

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

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