Skip to content

Performance of Nullable types

I saw a interesting post by David Kean about the performance of the nullable types in .NET 2.0. The new int? type is about 50% slower than int and the bool? is about 15% than bool. The post is worth reading if only for the great example code for using interfaces.

I’m not concerned over the speed issue. You don’t need nullable types everyday and when you do want one, it will be nice to have support for them at the framework. Hopefully the performance issue will be resolved before .NET 2.0 gets out of beta.