[Bug libstdc++/67922] std::unordered_map::clear should take time linear in the number of elements

2015-11-02 Thread yegor.derevenets at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67922 --- Comment #3 from Yegor Derevenets --- A small correction. A colleague of mine bothered to read the source code of libc++ and noticed that its implementation of clear() method also generally takes time, linear in the number of buckets. This

[Bug libstdc++/67922] std::unordered_map::clear should take time linear in the number of elements

2015-10-12 Thread yegor.derevenets at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67922 --- Comment #2 from Yegor Derevenets --- > But then the issue is that clear () doesn't shrink the map. No, the issue is that clear() touches all the buckets, instead of touching only those containing the elements. libc++'s implementation does

[Bug libstdc++/67922] New: std::unordered_map::clear should take time linear in the number of elements

2015-10-10 Thread yegor.derevenets at gmail dot com
: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: yegor.derevenets at gmail dot com Target Milestone: --- std::unordered_map::clear internally clears the whole array of buckets using memset. Consequently, the clearing

[Bug libstdc++/55123] New: [C++11] Construction of shared_ptrconst T from unique_ptrconst T fails

2012-10-29 Thread yegor.derevenets at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55123 Bug #: 55123 Summary: [C++11] Construction of shared_ptrconst T from unique_ptrconst T fails Classification: Unclassified Product: gcc Version: 4.7.2 Status:

[Bug libstdc++/55123] [C++11] Construction of shared_ptrconst T from unique_ptrconst T fails

2012-10-29 Thread yegor.derevenets at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55123 --- Comment #1 from Yegor Derevenets yegor.derevenets at gmail dot com 2012-10-29 17:09:49 UTC --- Created attachment 28561 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=28561 Preprocessed test.cpp

[Bug libstdc++/55123] [C++11] Construction of shared_ptrconst T from unique_ptrconst T fails

2012-10-29 Thread yegor.derevenets at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55123 --- Comment #4 from Yegor Derevenets yegor.derevenets at gmail dot com 2012-10-29 18:35:45 UTC --- Confirm, the patch works for me.