Sunday, September 11, 2005

PDC Precon Sunday



Arrived in LA today for the PDC. I drove up from San Diego and even with the triathlon going on I made it to the conference center parking lot without hitting any traffic.

You know, I’ve attended probably close to a dozen of these big Microsoft events like PDC, TechEd, and WinHEC but the shear size and number of people involved always impresses me.

Today was Jeffery Richter’s pre-conference talk on the .Net Framework 2.0. He’s such a great speaker and I really enjoyed and learned a lot from his talk.

Among a whole load of things he discussed, one of the topics was Generics.

What I found interesting was that one of the big things that makes Generics in the .Net Framework different are that they are instantiated during the JIT compilation. That has a number of benefits.

1) It eliminates boxing, some implementations of generics take away the type parameters and substitute it with a base class Object instead which doesn't add the performance benefit

2) There is full support for reflection

3) There is full support for dynamic code generation

4) The instantiated generic class does not need access to any of the generic class' code. Simply referencing the assembly is sufficient.

5) The JIT compiled code for a generic class instantiation is shared among all of the types passed in, if those types are reference types.

For example, Dictionary<string, string> and Dictionary<string, Bitmap> shares the same JIT code (as will all Dictionary<,> types with two reference types passed in). Unfortunately, Dictionary<int, int> and Dictionary<float, float> do not share JIT compiled code, that only applies to reference types since they are all essentially pointers. It is a nice space and JIT time optimization.

On another note, Jeff Richter also mentioned that on the Wintellect web site, there is a set of Power Collections. Apparently, Microsoft hired Wintellect to create these collection classes and the idea is that they will be migrated to a later version of the .Net Framework (post v2.0). I'm looking forward to giving them a spin.

He talked about a whole load of other things as well covering all of the new features in C# as well as a lot of CLR level things.

These conferences are always like trying to drink from a fire hose… sure is a lot of fun though :)

0 Comments:

Post a Comment

<< Home