Visual studio feeds

All Visual Studio blogs in one place


Enter your email address:

Delivered by FeedBurner

Increase your website traffic with



Anti-spam: How many eyes has a typical person?

Follow us on FB


How To Get Faster – Forwarding Empty Values

AddThis Social Bookmark Button
Last time we did have a look into the issues you get if you create many class instances. The more class instances you have the more complex is your object graph which means more work for the GC. If the GC has more work there is less CPU time for your application left which does make it slower. An easy way to fix this issue is to create a struct which is a value type which is copied by value and does not add complexity to your object graph. Common wisdom suggests that your structs should not get bigger
much than the actual reference type size (16 bytes on 32 bit, 24 bytes for 64 bit). This quite big limitation renders structs useless as general purpose data access object containers. Really? The key insight is that we do not need to store the actual data inside the value type. We must only be able to access it from our struct. This way we can employ the struct as forwarder which does not contain the actual data but uses indexes to retrieve the actual instance data from a DataProvider object. public class...(Read whole news on source site)

Home : Blog List : Alois Kraus : How To Get Faster – Forwarding Empty Values