[Code Index] by Mike Marynowski

programming for work and fun

Value Type Box Cache

We've recently been building a .NET object database that necessarily stores a lot of data in object[] arrays. Most of the values in these arrays are default values (i.e. 0 for numbers), small integers, boolean values or enums. On a loaded instance there can be many millions of these boxes values sitting in memory and they are constantly being created and collected, which got me thinking...we could probably cache and reuse the boxes for a lot of these values, and thus the BoxCache was born! [More]

 Hi, I am Mike, overlord of Singulink :)

This is where I post mostly software development related stuff I think might be useful and interesting.

Posts by Date