[Bug libstdc++/77524] Empty std::deque allocates unnecessary heap memory

2016-09-08 Thread d.rigby at me dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77524 --- Comment #5 from Dave Rigby --- (In reply to Jonathan Wakely from comment #4) > Please create a new bug for those container adaptors, as that can and should > be fixed for the default configuration. We'll keep this bug for the >

[Bug libstdc++/77528] New: std::queue default constructor unnecessarily creates temporary of underlying Container

2016-09-08 Thread d.rigby at me dot com
Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: d.rigby at me dot com Target Milestone: --- Spun out from bug 77524 - std::queue (defaulting to using std::deque as the underlying Container) performs 4

[Bug libstdc++/77524] Empty std::deque allocates unnecessary heap memory

2016-09-08 Thread d.rigby at me dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77524 --- Comment #3 from Dave Rigby --- As an aside, std::queue<> (defaulting to using std::deque as the underlying Container) suffers from a similar issue - I see 4 allocations for an empty std::queue. Is this the same underlying issue, or should I

[Bug libstdc++/77524] Empty std::deque allocates unnecessary heap memory

2016-09-08 Thread d.rigby at me dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77524 --- Comment #2 from Dave Rigby --- Hi Jonathan, Thanks for the context - useful to know why the current behaviour is the case (even if not ideal).

[Bug libstdc++/77524] New: Empty std::deque allocates unnecessary heap memory

2016-09-08 Thread d.rigby at me dot com
Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: d.rigby at me dot com Target Milestone: --- Created attachment 39582 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=39582=edit deque_alloc_test.cc I'm observing a performance issue under g++/libs