I am considering whether to utilize memory pool, and its use for allocation/deallocation via allocator. (such as boost::pool_allocator etc)
My program entails high frequent construction/destruction of vector or unordered_map containers, and particularly destruction takes high overhead.
Is it correct way to use memory pool and its allocator to minimize such a overhead?
(i.e. could memory pool allocator reduce time for destruction of STL containers?)
I understand its simple use does not reduce overhead of destructor.
I guess the reason of taking time is because a lot of vector are.destructed as unordered_map<int, vector> or unordered_map<int,unordered_map<int,vector> >.
So, I am looking for some efficint way to use it with frequent generation and destruction.