Welcome to the definitive guide for .NET performance. Writing High-Performance .NET Code by Ben Watson is the best-selling book about understanding the fundamentals of .NET performance. It contains detailed explanations, instructions, tools, and tips to help you get the best .NET performance immediately.
New 2nd Edition Available Now!
The new version of the book is now available! 50% longer, with more tools, more insights, more code, more stories, and more topics! Order yours today and receive it as soon as possible!
See what’s new in the 2nd edition.
A free sample chapter for the 2nd edition is available. This includes the table of contents, foreword, introduction to the 2nd edition, Chapter 5 – General Coding and Class Design, as well as some of the back material such as bibliography and index.
No Dogma – Episode 95 – Had a great discussion with Bryan about .NET perf. Check it out!
.NET Rocks – Episode 1545 – A wonderful follow-up discussion where we talk .NET Core, other changes over the years since the previous edition.
.NET Rocks! – Episode 1041 – I had a great discussion with Carl and Richard about getting the best performance out of .NET. Definitely give this a listen and subscribe to this wonderful podcast.
This Week on Channel 9, Episode on August 8, 2014 [skip to 13m18s] “If you are a developer who cares about the performance of your code, this book will soon become the Bible of writing highly performant .NET code.”
Where to buy?
See retail locations for where you can buy a copy. The print edition is cover price is $24.99 and the eBook edition is a deal at only $9.99 (prices may vary in your country). Some retailers offer significant discounts from that price, however.
What do readers say?
Here are some excerpts from reviews about the book:
“This book is incredibly well-crafted…Ben’s style provides layers to these topics so the reader can choose how deep to go while still gaining valuable insights.” 5 stars – T. Segal
“It’s engaging, and reads like a technical memoirs of the lessons learned from the genesis of a very large scale .NET service. Readability is great, but the technical content is invaluable…. I personally felt that the chapter on GC alone is easily worth the price of the book and the time to read it….it’s an excellent resource to fully understand what you need to know about GC…. This book does a very good job and breaking down the myths of poor performing managed code, and the optimal strengths managed code has over native…. I gave this book 5 stars for several reasons. First, it delivers on the content and readability the book is selling. The price is also very generous for the content you’re getting.” 5 stars – I. Paradiso
“This is an awesome book–a must read for performance engineers of all levels, supported with tools, techniques, and statistics.” 5 stars – Bipin P.
“This is why this book stood out; the author used real-life examples to provide clear, concise explanations about the .Net framework. I would recommend this book to anyone who is weighing the benefits of managed-code vs unmanaged code.” 5 stars – Emit B.
“Concise and straight to the point…it caters to all levels of expertise.” 5 stars – L. Gomez
Learn the secrets of excellent .NET performance with insightful, detailed, and clear explanations. Do you want your .NET code to have the absolute best performance it can? This book demystifies the CLR, teaching you how and why to write code with optimum performance. Learn critical lessons from a person who helped design and build one of the largest high-performance .NET systems in the world.
This book does not just teach you how the CLR works—it teaches you exactly what you need to do now to obtain the best performance today. It will expertly guide you through the nuts and bolts of extreme performance optimization in .NET, complete with in-depth examinations of CLR functionality, free tool recommendations and tutorials, useful anecdotes, and step-by-step guides to measure and improve performance. Through this book, you will achieve the best .NET performance possible.
Among the topics you will learn are how to:
- Choose what to measure and why
- Use many amazing tools, freely available, to solve problems quickly
- Understand the .NET garbage collector and its effect on your application
- Use effective coding patterns that lead to optimal garbage collection performance
- Diagnose common GC-related issues using a powerful, free .NET performance profiler
- Reduce costs of JITting
- Use multiple threads sanely and effectively, avoiding synchronization problems
- Know which .NET features and APIs to use and which to avoid
- Use code generation to avoid performance problems
- Measure everything and expose hidden performance issues
- Measure not just your .NET application performance, but .NET framework performance
- Instrument your program with performance counters and ETW events
- Use the latest and greatest .NET features
- Ensure your code can run on mobile devices without problems
- Build a performance-minded team
- Build an effective infrastructure for .NET performance testing
…and much more.If you wish to receive updates about the book and related .NET performance articles, please Like the Facebook page: