What is your Allocation Number?
Rico is doing some very interesting work to get some sort of idea about the allocation overhead of using different parts of the .NET Framework. As he says, this is a fairly rough approximation done just with static analysis, but it does give you something to chew on. Rico starts by focusing on making a good hashcode function… I thought I'd look at properties. As you know the Framework Design Guidelines encourages you to make simple properties that are logically just fields . There is a reasonable assumption that the get accessor of a property would not have to allocate any data. The good news is the vast majority of these had 0 or 1 allocation. The thing to watch out for is that some of the worst offenders are properties, with 15 with a score
Read More...
Read the complete post at http://blogs.msdn.com/brada/archive/2007/01/29/what-is-your-allocation-number.aspx