search for: largeth

Displaying 4 results from an estimated 4 matches for "largeth".

Did you mean: larget
2020 Nov 17
3
RFC: [SmallVector] Adding SVec<T> and Vec<T> convenience wrappers.
...riginal proposal when I first drafted the patch, and I'm happy to just add the default. > > Thoughts/suggestions: > - Adding the default seems very reasonable to me, and I think that 64 > bytes is a good default. I think you should change the behavior so that > SmallVector<LargeThing> defaults to a single inline element instead of zero > though. Perhaps generate a static_assert when it is crazy large. > That would work for me. Mehdi, would SmallVector<T>, defaulting to a minimum single inline element with static_assert(sizeof(T) < 512) address your conce...
2020 Nov 17
0
RFC: [SmallVector] Adding SVec<T> and Vec<T> convenience wrappers.
...t to be a mishmash of the two. I’d rather keep the world consistent here and have an opinionated “one way to do it”. Thoughts/suggestions: - Adding the default seems very reasonable to me, and I think that 64 bytes is a good default. I think you should change the behavior so that SmallVector<LargeThing> defaults to a single inline element instead of zero though. Perhaps generate a static_assert when it is crazy large. - The name SmallVector has always been confusing, InlinedVector is more principled, but is even more verbose for such a common type. If you think it is worth shrinkifying...
2020 Nov 17
0
RFC: [SmallVector] Adding SVec<T> and Vec<T> convenience wrappers.
...my original proposal when I first drafted the patch, and I'm happy to just add the default. > > > Thoughts/suggestions: > - Adding the default seems very reasonable to me, and I think that 64 bytes is a good default. I think you should change the behavior so that SmallVector<LargeThing> defaults to a single inline element instead of zero though. Perhaps generate a static_assert when it is crazy large. > > That would work for me. > > Mehdi, would SmallVector<T>, defaulting to a minimum single inline element with static_assert(sizeof(T) < 512) address...
2020 Nov 13
6
RFC: [SmallVector] Adding SVec<T> and Vec<T> convenience wrappers.
We've pretty happy now with a patch that adds two wrappers around SmallVector that make it 1) more convenient to use and 2) will tend to mitigate misuse of SmallVector. We think it's ready for wider discussion: https://reviews.llvm.org/D90884 SVec<T> is a convenience alias for SmallVector<T, N> with N chosen automatically to keep its size under 64 Bytes (that heuristic is easy