Value Type Pro Tips

Beware of implicit boxing of value types

In the last post, we looked at some inef­fi­cien­cies with ref­er­ence types in .Net and per­haps over­sold val­ue types a lit­tle  In any case, now that we’ve made the ini­tial sale and you’re back for more, let’s talk about some pit­falls wrt the use of val­ue types you should be aware of. Specif­i­cal­ly let’s focus on cas­es …

Beware of implic­it box­ing of val­ue typesRead More »

Smallest .Net ref type is 12 bytes (or why you should consider using value types)

(Update 2015/07/21 : read the next post in this series to learn about the places where implic­it box­ing hap­pens with val­ue types and how you can pre­vent them)   I chanced upon Sasha Goldshtein’s excel­lent book, Pro .Net Per­for­mance : Opti­mize Your C# Appli­ca­tion, a few years back and I thor­ough­ly enjoyed it. Even though …

Small­est .Net ref type is 12 bytes (or why you should con­sid­er using val­ue types)Read More »

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.