Hello,
In our C# (.NET 4.0) application, we allocate and de-allocate a lot of memory, in different size chunks. We want to move to an object pool, to improve performance.
We implemented an object pool already and saw some performance improvement. We're currently using a stack-based backing store. Other possible alternatives are, queue based store, ConcurrentBag<> based store, List<> based store, etc.
I guess the choice of backing store really depends on the application's characteristics, so we're now in the process of implementing the object pool with all these different backing stores and testing the performance.
However, I'd really like to hear your thoughts on pros and cons of different backing stores for object pooling.
Thanks