• Complain

Watson - Writing High-Performance .NET Code

Here you can read online Watson - Writing High-Performance .NET Code full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. City: Los Gatos, year: 2014, publisher: Ben Watson;Smashwords Edition, genre: Computer. Description of the work, (preface) as well as reviews are available. Best literature library LitArk.com created for fans of good reading and offers a wide selection of genres:

Romance novel Science fiction Adventure Detective Science History Home and family Prose Art Politics Computer Non-fiction Religion Business Children Humor

Choose a favorite category and find really read worthwhile books. Enjoy immersion in the world of imagination, feel the emotions of the characters or learn something new for yourself, make an fascinating discovery.

Watson Writing High-Performance .NET Code
  • Book:
    Writing High-Performance .NET Code
  • Author:
  • Publisher:
    Ben Watson;Smashwords Edition
  • Genre:
  • Year:
    2014
  • City:
    Los Gatos
  • Rating:
    5 / 5
  • Favourites:
    Add to favourites
  • Your mark:
    • 100
    • 1
    • 2
    • 3
    • 4
    • 5

Writing High-Performance .NET Code: summary, description and annotation

We offer to read an annotation, description, summary or preface (depends on what the author of the book "Writing High-Performance .NET Code" wrote himself). If you haven't found the necessary information about the book — write in the comments, we will try to find it.

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.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- 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- 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...and much more.

Writing High-Performance .NET Code — read online for free the complete book (whole text) full work

Below is the text of the book, divided by pages. System saving the place of the last page read, allows you to conveniently read the book "Writing High-Performance .NET Code" online for free, without having to search again every time where you left off. Put a bookmark, and you can go to the page where you finished reading at any time.

Light

Font size:

Reset

Interval:

Bookmark:

Make

Writing

High-Performance

.NET Code

Ben Watson

Writing High-Performance .NET Code

Version 1.5

Smashwords Edition

ISBN-13: 978-0-9905834-4-8

ISBN-10: 0-9905834-4-9

Copyright 2014 Ben Watson

All Rights Reserved. These rights include reproduction, transmission, translation, and electronic storage. For the purposes of Fair Use, brief excerpts of the text are permitted for non-commercial purposes. Code samples may be reproduced on a computer for the purpose of compilation and execution and not for republication.

This eBook is licensed for your personal and professional use only. You may not resell or give this book away to other people. If you wish to give this book to another person, please buy an additional copy for each recipient. If you are reading this book and did not purchase it, or it was not purchased for your use only, then please visit http://www.writinghighperf.net/buy/ and purchase your own copy. If you wish to purchase this book for your organization, please contact me for licensing information. Thank you for respecting the hard work of this author.

Trademarks

Any trademarked names, logos, or images used in this book are assumed valid trademarks of their respective owners. There is no intention to infringe on the trademark.

Disclaimer

While care has been taking to ensure the information contained in this book is accurate, the author takes no responsibility for your use of the information presented.

Contact

For more information about this book, please visit .

Cover Design

Cover design by Claire Watson, http://www.bluekittycreations.co.uk.

Table of Contents

About the Author

Ben Watson has been a software engineer at Microsoft since 2008. On the Bing platform team, he has built one of the worlds leading .NET-based, high-performance server applications, handling high-volume, low-latency requests across thousands of machines for millions of customers. In his spare time, he enjoys geocaching, books of all kinds, classical music, and spending time with his wife Leticia and daughter Emma. He is also the author of the book C# 4.0 How-To, published by Sams.

About the Technical Editor

Mike Magruder has been a software engineer since the early 90s. He worked on the .Net Runtime team from v1 thru v4, and he worked on the Bing platform team where he architected one of the worlds leading .NET-based, high-performance server applications. In his spare time, he enjoys snowboarding, building snowboards, and spending time with his wife Helen.

Acknowledgements

Thank you to my friend and technical editor Mike Magruder for his invaluable feedback on this book, and more importantly, for his three years of mentorship at Microsoft that changed my career. This has made me a hundred times the engineer I was.

I also owe a big thank you to Maoni Stephens for her in-depth guidance and feedback about the garbage collector. Thank you as well to Abhinaba Basu for information about the CLR on Windows Phone, and Brian Rasmussen for feedback on a number of topics.

I would not have started this book without a random conversation with my brother-in-law James Adams that got me thinking about actually writing a book like this. Thanks to my editors, my dad Michael Watson and my wife Leticia for their many hours of reading and rereading of the drafts.

Very special thanks to Leticia and our daughter Emma who supported many hours of absence while I worked on this book. I could not have done this without your support and encouragement.

Introduction
  1. Purpose of this Book

.NET is an amazing system for building software. It allows us to build functional, connected apps in a fraction of the time it would have taken us a decade ago. So much of it just works, and that is a great thing. It offers applications memory and type safety, a robust framework library, services like automatic memory management, and so much more.

Programs written with .NET are called managed applications because they depend on a runtime and framework that manages many of their vital tasks and ensures a basic safe operating environment. Unlike unmanaged , or native, software written directly to the operating systems APIs, managed applications do not have free reign of their process.

This layer of management between your program and the computers processor can be a source of anxiety for developers who assume that it must add some significant overhead. This book will set you at ease, demonstrate that the overhead is worth it, and that the supposed performance degradation is almost always exaggerated. Often, the performance problems developers blame on .NET are actually due to poor coding patterns and a lack of knowledge of how to optimize their programs on this framework. Skills gained from years of optimizing software written in C++, Java, or VB may not always apply to managed code, and some advice is actually detrimental. Sometimes the rapid development nature of .NET can encourage people to build bloated, slow, poorly optimized code faster than ever before. Certainly, there are other reasons why code can be of poor quality: lack of skill generally, time pressure, poor design, lack of developer resources, laziness, and so on. This book will explicitly remove lack of knowledge about the framework as an excuse and attempt to deal with some of the others as well. With the principles explained in this book, you will learn how to build lean, fast, efficient applications that avoid these missteps. In all types of code, in all platforms, the same thing is true: if you want performant code, you have to work for it.

This is not a language reference or tutorial. It is not even a detailed discussion of the CLR. For those topics, there are other resources (see Appendix CBibliography for a list of useful books, blogs, and people to pay attention to). To get the most out of this book you should already have in-depth experience with .NET.

There are many code samples, especially of underlying implementation details in IL or assembly code. I caution you not to gloss over these sections. You should try to replicate my results as you work through this book so that you understand exactly what is going on.

This book will teach you how to get maximum performance out of managed code, while sacrificing none or as little of the benefits of .NET as possible. You will learn good coding techniques, specific things to avoid, and perhaps most importantly, how to use freely available tools to easily measure your performance. This book will teach you those things with minimum fluff. This book is what you need to know, relevant and concise, with no padding of the content. Most chapters begin with general knowledge and background, followed by specific tips, and finally ending with a section on step-by-step measurement and debugging for many different scenarios.

Along the way you will deep-dive into specific portions of .NET, particularly the underlying Common Language Runtime (CLR) and how it manages your memory, generates your code, handles concurrency, and more. You will see how .NETs architecture both constrains and enables your software, and how your programming choices can drastically affect the overall performance of your application. As a bonus, I will share relevant anecdotes from the last six years of building very large, complex, high-performance .NET systems at Microsoft. You will likely notice that my bias throughout this book is for server applications, but nearly everything discussed in this book is applicable to desktop and mobile applications as well. Where appropriate, I will share advice for those specific platforms.

You will gain a sufficient understanding of .NET and the principles of well-performing code so that when you run into circumstances not specifically covered in this book, you can apply your newfound knowledge and solve unanticipated problems.

Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «Writing High-Performance .NET Code»

Look at similar books to Writing High-Performance .NET Code. We have selected literature similar in name and meaning in the hope of providing readers with more options to find new, interesting, not yet read works.


Reviews about «Writing High-Performance .NET Code»

Discussion, reviews of the book Writing High-Performance .NET Code and just readers' own opinions. Leave your comments, write what you think about the work, its meaning or the main characters. Specify what exactly you liked and what you didn't like, and why you think so.