About This eBook by Bart De Smet

Safari, the world’s most comprehensive technology and business learning platform.

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required

O'Reilly logo

Performance Intermezzo

As mentioned at the beginning of this chapter, one benefit of generic types is their allegedly better performance profile. An underlying problem also mentioned earlier in this chapter is the excessive boxing that occurs when storing value types using the most applicable type in .NET: System.Object.

Note: What About Boxing in Other Platforms?

.NET’s capability to treat value types and reference types in the same manner is a side effect of its unified type system design philosophy. It allows all languages to think in terms of a single type hierarchy, abstracting away seemingly irrelevant differences between various kinds of types: Everything is a System.Object in the end.

Other platforms, such as Java, did not go that far ...

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required