DCSIMG
Performance - All Your Base Are Belong To Us

All Your Base Are Belong To Us

Mostly .NET internals and other kinds of gory details

Browse by Tags

All Tags » Performance (RSS)
Aggressive Inlining in the CLR 4.5 JIT
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!...
SDP December 2011: Improving the Performance of .NET Applications
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...
Tracking Engagement Time Using 302-Moved Temporarily Redirects
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...
SIMD-Optimized C++ Code in Visual Studio 11
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...
Improvements in the CLR Core in .NET Framework 4.5
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...
SELA Developer Days 2011 – Improving the Performance of .NET Applications
There’s just one day left for the SELA Developer Days , and today I delivered my session titled Improving the Performance of .NET Applications . In this brief one-day session I wanted to distill the best practices and tools for measuring various performance metrics, but also provide some insight into OS and CLR internals relevant to high-performance development. Other sessions today included Parallel Programming: One Step Beyond , Windows Phone Mango , Introduction to Scrum , and Visual Studio 2010...
The Future of Microprocessors—Must Read for Developers
Long-time readers of this blog know that I really don’t like rehashing someone else’s thoughts and linking to material that isn’t my own. However, the ACM article The Future of Microprocessors (S. Borkar, A. Chien) warrants an exception to this rule. If you can afford the time (approx. 2 hours), I strongly recommend that you read the article instead of my somewhat incoherent ramblings below. If you’re looking for an executive summary highlighting some of the biggest challenges and likely solutions...
Sela Developer Days – June 26-30
During the last week of June Sela is going to host 25 one-day sessions in 5 days packed with the latest and greatest Microsoft technologies, agile and ALM tips, debugging and troubleshooting, cloud and web. This mini-conference, dubbed Sela Developer Days , is going to open for registration on Sunday and I encourage you to take a look at the conference website to see what sessions are going to be available. Yours truly is scheduled for four sessions. Instead of rehashing the abstracts from the conference...
All-Pairs-Shortest-Paths Algorithm in Real Life
I got a phone call from a colleague the other day asking for advice on a live consulting session at a client site. The problem description (amended to prevent information disclosure) went something like this: We’re implementing a service that manages a set of physical backup devices. There is a set of conveyor belts with intersections and robot arms that manipulate backup tapes across the room. The service gets requests such as “transfer a fresh tape X from storage cabinet 13 to backup cabinet 89...
Session Materials from TechEd 2010: Performance and Debugging in Visual Studio 2010
The TechEd is finally over. Three days of fun in sunny Eilat with 67 colleagues from Sela and lots of good friends from the industry are done. Thanks a lot for coming to my session—Deep Dive into Performance and Debugging in Visual Studio 2010! I’m not sure when the conference website is going to have the slide decks and demo code, and I promised you a blog post full of resources and links, so here it goes. The slides and demos can be downloaded from here . It might take a little while to figure...
Some Teasers for My TechEd 2010 Session: Performance and Debugging in Visual Studio 2010
The TechEd is near and so is my session on Tuesday, 11:15 at the Hilton big hall . When I wrote about it two weeks ago, I really had no idea how awesome it’s going to turn out! Some cool things I’m going to show during my session: Customizing IntelliTrace events with declarative and programmable data queries SOS and PSSCor2 “better together” and DML support Visualizing managed object references using the Visual Studio 2010 architecture diagramming support   Bleeding-edge profiler reports with...
Generic Method Dispatch
Inside a method that is generic in T you may invoke on an expression of type T any of the System.Object methods, or methods that belong to the class or interface constraints of T. Because the JIT does not invoke a full-blown compiler when generating code for a specific type T, there is a significant difference in performance when invoking methods on value types in this fashion. Assume the following value type describes a point in two-dimensional space. The value type overrides ValueType.Equals and...
Enumerator Structs: Optimizing for the Common Case
I read a couple of posts by Simon Cooper where he explains in great details why mutable structs are bad, and how the BCL’s enumerator structs (e.g. LinkedList<T>.Enumerator ) are prime candidates for this anti-pattern. He dissects a really nasty bug where declaring a value type field as readonly effects unexpected copy semantics if the value type is modified. The following code enters an infinite loop (which prints 0 indefinitely): class   EnumeratorWrapper {     private...
Perceived Response Time from a Developer’s Perspective
One of the most cited usability problems is when the actual implementation response time is very different from the perceived and expected response time. In most cases, the implementation response time is slower than expected. Yesterday I had an interesting observation to the contrary. As a developer, I understand what the “actual” implementation response time should be, because I understand the runtime complexity of an operation and can bring into consideration other factors such as network latency...
DevAcademy4 Session: Watch the Video and Download the Slides and Demos
I promised you that my DevAcademy4 session will be recorded and available online shortly after the conference. Well, the conference was a blast, and the video recording, slides, and demos are all available online. Everyone who had to stand me for over 60 minutes in the packed session hall—thanks a lot for coming, and I hope you had fun! If there’s anything at all that you would like to follow up on, feel free to use the contact form . It might take a while before the materials are available at the...
More Posts Next page »