Browse by Tags
All Tags »
Performance (
RSS)
There have been some very interesting discussions at the MVP Summit concerning the CLR JIT, what we expect of it, and how to evolve it forward. I obviously can't disclose any NDA materials, but what I can do is share my hopes and dreams for the JIT, going forward. This is not a terribly popular subject, but there are some UserVoice suggestions around the JIT, such as adding SIMD support to C# . The state of the JIT today is that it's a fairly quick compiler that does a fairly bad job at optimization...
In 2008, I blogged about the just-released Windows Performance Toolkit , and the xperf tool that collects ETW events (including stack traces) and displays them in a form that allows basic analysis. Since then, ETW generation and collection have taken a huge leap forward. Microsoft has released a great library for creating ETW providers , and a set of tools ( PerfMonitor , PerfView ) for analyzing ETW traces in .NET apps. With the release of the Windows 8 SDK, xperf has been superseded by two new...
Thanks for attending my DevReach session on task and data parallelism ! We discussed the APIs available to you in the Task Parallel Library and how to avoid common pitfalls and squeeze performance from seemingly difficult to parallelize algorithms. Among the topics we covered: Measuring concurrency using the Visual Studio Concurrency Visualizer Extracting parallelism from recursive algorithms Symmetric data processing and uneven work distribution Dependency management with continuations Synchronization...
Thanks for attending my DevReach session on garbage collection performance tips ! This is one of my favorite subjects, and I found it very hard to cover it well in just under one hour. Still, we discussed the general inner workings of the garbage collector and highlighted several best practices for improving your application performance. Among the topics we covered: Switching GC flavors and understanding server, concurrent, and background GC Finding long-lived objects and allocation sources with...
This is a short excerpt from Chapter 2 (Performance Measurement) of Pro .NET Performance , scheduled to appear in August 2012. I might be publishing a few more of these before and after the book is out. The purpose is to determine “which is faster”—using the is keyword and then casting to the desired type, or using the as keyword and relying on the result. Here’s a test class for this comparison I’ve seen lately: //Test class class Employee { public void Work() {} } //Fragment 1 – casting...
This is a short excerpt from Chapter 5 (Collections and Generics) of Pro .NET Performance , scheduled to appear in August 2012. I might be publishing a few more of these before and after the book is out. Choosing the right collection is not only about its performance considerations. The way data are laid out in memory is often more critical to CPU-bound applications than any other criterion, and collections affect this layout greatly. The main factor behind carefully examining data layout in memory...
This is a short excerpt (with slight modifications) from Chapter 10 of Pro .NET Performance , scheduled to appear in August 2012. I might be publishing a few more of these before and after the book is out. Theoretically, .NET developers should never be concerned with optimizations tailored to a specific processor or instruction set. After all, the purpose of IL and JIT compilation is to allow managed applications to run on any hardware that has the .NET Framework installed, and to remain indifferent...
This is a short excerpt from Chapter 1 of Pro .NET Performance , scheduled to appear in August 2012. I might be publishing a few more of these before and after the book is out. We have an Amazon page and a cover image now! Where do you fit performance in the software development lifecycle? This innocent question carries the mind baggage of having to retrofit performance into an existing process. Although it is possible, a healthier approach is to consider every step of the development lifecycle an...
It is customary to apologize for a prolonged blog silence, so here goes: I’ve been very busy with three extremely interesting projects, one of which is the SELA Developer Practice that is very near. Here’s another: It’s been more than five years since I wrote a SELA course called Effective C#, which quickly turned to another course called .NET Performance . Since then, I trained this course dozens of times, spoke about performance optimization at conferences, delivered a one-day summary at several...
Yesterday I delivered a short closed session on performance profiling and optimization at Microsoft Raanana. Thanks to Maor David for hosting this session. Thanks to a very attentive audience I was able to cover all of the following: The pitfalls of micro-benchmarking Performance measurement with the Visual Studio Profiler Instrumentation for production profiling The case of the 250ms delay CPU cache optimization in general, cache collision on SMP Parallelization with C++/AMP The slides are demos...
Inlining is an important optimization that allows compilers to eliminate the cost of method calls in situations where the method call overhead is more significant than the method body itself. The CLR JIT uses inlining conservatively, but features some nice tricks such as interface method call inlining – this was one of the first things I covered on this blog, almost five years ago. The limitations on JIT inlining are not known precisely, but some criteria have been announced previously (in 2004!...
I apologize for the silence during the last two weeks—organizing the SDP and preparing three full-day sessions and two keynotes left no time to breathe :-) On Monday I delivered a session called Improving the Performance of .NET Applications at the SELA Developer Practice . Here are some of the practical scenarios we covered: Measuring application memory usage and allocation sources Diagnosing memory leak sources with memory profilers Using sampling and instrumentation profilers to find CPU bottlenecks...
Suppose you are sending mass emails (legitimately, no doubt) and want to know which % of recipients actually viewed the email. The standard trick here is to embed a 1x1 image into your email’s HTML source, with the <img src= pointing to a location on your Web server with part of the URL unique to the user (e.g., <img src="http://example.com/track/12345" /> where your mailing system knows that 12345 is associated with john@example.org). When the user opens your email, most email...
The C++ compiler in Visual Studio 11 has another neat optimization feature up its sleeve. Unlike intrusive features, such as running code on the GPU using the AMP extensions, this one requires no additional compilation switches and no changes – even the slightest – to the code. The new compiler will use SIMD ( Single Instruction Multiple Data ) instructions from the SSE/SSE2 and AVX family to "parallelize" loops. This is not the standard, thread-level parallelism, which runs certain iterations...
Alongside all the exciting advents in Windows 8 and Metro apps, the .NET CLR is marching on. The next version of the CLR will feature several “internals” improvements, mostly in the performance area. Read on to learn about changes to the garbage collector, the JIT, and the native image generator engine in the next CLR. Background mode for Server GC Background GC is a neat feature introduced in CLR 4.0 to the Workstation GC flavor. It’s a little hard to explain without any background (pun intended...
More Posts
Next page »