search for: shrinkifying

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

2020 Nov 17
3
RFC: [SmallVector] Adding SVec<T> and Vec<T> convenience wrappers.
...lting 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 redundant name is a good thing > (except to smooth the transition). > > - If people are concerned about the default...
2020 Nov 17
0
RFC: [SmallVector] Adding SVec<T> and Vec<T> convenience wrappers.
...or<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 thing (except to smooth the transition). - If people are concerned about the default being bad, then you cou...
2020 Nov 17
0
RFC: [SmallVector] Adding SVec<T> and Vec<T> convenience wrappers.
...e 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 thing (except to smooth the transition). I like the idea of a minor rename, although a bit different: - Small...
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