Intro to Programming Excercise: Bouncing Balls

This article is the beginning of a new ‘Introduction to Programming’ topic for my blog.  The BouncingBalls example. Basically, I have decided to try to teach programming to a set of teenagers from my son’s junior high school, and this topic will be a set of instruction materials for that ‘course’.  The basic premise is…

4

Drilling into .NET Runtime microbenchmarks: ‘typeof’ optimizations.

In my last blog entry showed how to use a simple simle class called MultiSampleCodeTimer to measure the performance (time), of pretty much any fragment of CLR code quickly and easily.  That entry had a solution packaged up as a zip file TypePerfMeasurement.zip that you could use to duplicate the experiment yourself.   However I did…

4

Measuring managed code quickly and easiliy: CodeTimers

My performance blog entries to date have been ‘foundational’.  In entries so far, I talk about how to use Visual Studio to look at the native code generated for the runtime.   With this foundation, we can now start exploring what the native code for managed code looks like and what optimzations the runtime does on…

14

Digging deeper into managed code with Visual Studio: Using SOS

I have let my blog laps for too long.    I am back to blogging.   I realized reciently that we have simply not written down many interesting facts about how the runtime actually works.  I want to fix this.   Coming up in future blogs I am going to be doing a bit of a ‘architectural overview’ which…

11

Analysis of Reader-Writer lock

In my last post I posted readerWriterDemo.cs which is an implementation of a Reader-Writer lock.   I held it up as an example of good design of a concurrent data structure.   I want to now show you a bit of what my thinking was when it was designed and what the important properties it has.   Before you…

14

Low-Lock Techniques in action: Implementing a Reader-Writer lock

In my article What Every Dev Must Know About Multithreaded Apps I discuss the fundamental principles of using locks correctly.  In that article I strongly encourage the use of reader-writer locks because these locks create the protection you need (insuring that readers and writers don’t conflict), while potentially allowing significantly more concurrency to take place (by…

19

Digging into interface calls in the .NET Framework: Stub-based dispatch.

In my last blog, I demonstrated how to use the .NET SOS.DLL extension DLL in the Visual Studio.    In this entry I will use the capabilities of this extension DLL to dig into the way the .NET framework handles interface dispatch.  As with all my blog entries, I hope that after reading this you will…

12

Getting down to the metal: using the CLR Runtime’s SOS extention in Visual Studio

In my last blog I talked a bit about how you go about using Visual Studio to look at “Release” code so that you can find out what code is actually generated by a particular high level programming construct.     As a quick recap the tricky part of insuring this is to Insure that your code is…

5

How to use Visual Studio to investigate code generation questions in managed code.

Introduction: What does ‘foreach’ actually do?   It is not uncommon for a new group to want to use manage code to pepper the CLR team with performance questions.  They want to know how expensive ‘foreach’ is, or whether certain methods get inlined or a variety of other questions about the code quality of.  …

16

Two articles on concurrent programming I wrote

This is just a quick plug for two articles that I wrote for MSDN magazine a few months back.  They are   What Every Dev Must Know About Multithreaded Apps Understand the Impact of Low-Lock Techniques in Multithreaded Apps   The first article, as its title suggests, is what I think every programmer should know…

0