search for: inlinedvector

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

2020 Nov 17
3
RFC: [SmallVector] Adding SVec<T> and Vec<T> convenience wrappers.
...enerate 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 concerns? -- Sean Silva > > - 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 the name SmallVector, then I think the best thing > to do is *rename* SmallVector (perhaps to IVector?) everywhere in the > codebase. I don’t think that introducing a redunda...
2020 Nov 17
0
RFC: [SmallVector] Adding SVec<T> and Vec<T> convenience wrappers.
...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 the name SmallVector, then I think the best thing to do is *rename* SmallVector (perhaps to IVector?) everywhere in the codebase. I don’t think that introducing a redundant name is a good th...
2020 Nov 17
0
RFC: [SmallVector] Adding SVec<T> and Vec<T> convenience wrappers.
...rgonomic too. - The `static_assert` is going to fail differently on different platforms, since `T`'s size will tend to be platform-dependent for large `T`. I'm not sure it'll be predictable enough. > -- Sean Silva > > > - 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 the name SmallVector, then I think the best thing to do is *rename* SmallVector (perhaps to IVector?) everywhere in the codebase. I don’t think that introducing a redundant name is a good th...
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