std::deque implementation seems non-optimal for use with std::queue

Joachim Achtzehnter joachima@netacquire.com
Wed Jan 22 17:22:00 GMT 2014


Yes, keeping (at least) one empty node around, as suggested in a message 
from 2005 (http://gcc.gnu.org/ml/libstdc++/2005-11/msg00031.html), would 
help with my use case. Not freeing nodes at all in pop_front() or 
pop_back() is probably easier to implement, but I get the impression 
that there is reluctance to go this far? This does appear to be 
Microsoft's approach, where nodes are only freed by clear() or when the 
whole contents is replaced via assignment, etc.

Joachim

-- 
joachima@netacquire.com http://www.netacquire.com



More information about the Libstdc++ mailing list