Memory has become a bottleneck in YetiSim execution (in particular the use of boost::shared_ptr), and I've decided to deal with it now rather than later. The strategy that I've decided upon is to implement a singleton MemoryManager class, which is responsible for allocation / deallocation of all objects. This is fine for a simulator, and rather custom to my project.
Another feature I want, is a memory pool so that I can reuse objects. This should improve performance, but only if there is no mutex on the pool. I've looked at boost::pool, and with a quick glance at it, it seems that the entire pool is mutexed to make it thread safe. This is fine, but I think we can do better with a better thought-out approach. I avoid mutexes except in sections of code where they are completely required. A memory pool could be a highly contested resource, and could lead to incorrect code or inefficient code if not implemented properly. I would prefer an approach in which mutexes are not required due to the algorithm employed.
I will be reading papers today, and thinking on the design of the pool. Thoughts are welcome. The pool will of course be contributed back to TBB for inclusion.