Profile Picture
IT Made Easy
The site provides some rough IT Notes that make your life easier. The site currently has notes on HTML, CSS, Regex, OOPS, JS, JQuery, PHP, Java, ASP.NET, C#, Database, Linux, URL Rewrite, SEO, Project Management and Hosting. Please do share this site if you like.

Performance For Generics

Next
Next
  • When we use object instead of generic variable for value types we waste on boxing effort and for both value and reference we waste at the point of downcasting to individual type
  • Also type safety at the time of downcasting is not considered
  • Server compiler compiles it into IL where there is placeholder for types and meta information regarding them
  • For value types client compiler converts IL to machine code where value is replaced and for reference replace it with objects. Code reuse not object reuse is done wherever possible
  • You can expect around 200% performance gain on value types and 100% on reference types

IT Notes

by VinodSebastian



IT Downloads


Catalogue