[PATCH] D16360: unordered_map: Avoid unnecessary mallocs when no insert occurs

Eric Fiselier via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 17 13:57:12 PDT 2016


Great! I think we should proceed with your is_trivially_copyable idea and
I'll see if I can come up with a pathological test case that breaks it.

Hopefully we can find something that works.
On Mar 17, 2016 2:54 PM, "Duncan P. N. Exon Smith via cfe-commits" <
cfe-commits at lists.llvm.org> wrote:

> r263746.
>
> > On 2016-Mar-17, at 13:36, Duncan P. N. Exon Smith via cfe-commits <
> cfe-commits at lists.llvm.org> wrote:
> >
> >>
> >> On 2016-Mar-16, at 15:41, Eric Fiselier <eric at efcs.ca> wrote:
> >>
> >> EricWF accepted this revision.
> >> EricWF added a comment.
> >> This revision is now accepted and ready to land.
> >>
> >> LGTM after change in inline comment.
> >>
> >>
> >> ================
> >> Comment at: include/__hash_table:114
> >> @@ +113,3 @@
> >> +template <class _Pair, class _Key, class _First, class _Second>
> >> +struct __can_extract_key<_Pair, _Key, pair<_First, _Second>>
> >> +    : conditional<is_same<typename remove_const<_First>::type,
> _Key>::value,
> >> ----------------
> >> `>>` needs to be `> >` for C++03.
> >
> > Since __can_extract_key is only used when !defined(_LIBCPP_CXX03_LANG),
> > I'll just move it behind an #ifdef (and leave the prettier `>>`).
> >
> > I'll commit after running the tests with -std=c++03.
> >
> >>
> >> http://reviews.llvm.org/D16360
> >>
> >>
> >>
> >
> > _______________________________________________
> > cfe-commits mailing list
> > cfe-commits at lists.llvm.org
> > http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160317/5bfa35c4/attachment.html>


More information about the cfe-commits mailing list