what is the optimal data structure for a pool container?

Viewed 1006

At the moment i use the STL vector container template to put back and get the connections.

1) on get, a connection is returned and "erase()"d from pool vector.

2) on release, the connection is handed back to the pool via "push_back()".

This might be very heavy if the pool is frequently used. So my question is, is there any way to improve the performance here by switching to an other data structure?

3 Answers
Related