Displaying 2 results from an estimated 2 matches for "r235229".
2018 Jun 22
3
RFC: Should SmallVectors be smaller?
...tack. They are intentionally used when sizeof(smallvector) isn’t important, so I don’t think this optimization will pay off.
For better or worse (mostly worse), there are a ton of SmallVector fields in data structures, including some even nested inside other SmallVectors (e.g., see the cleanup in r235229). Often these data structures are heap-allocated.
> Out of curiosity, what brings this up?
I've noticed that Clang is using more stack recently (we're seeing more crashes from template recursion; it seems the template recursion limit needs to shrink), and somehow that train of thought...
2018 Jun 21
4
RFC: Should SmallVectors be smaller?
I've been curious for a while whether SmallVectors have the right speed/memory tradeoff. It would be straightforward to shave off a couple of pointers (1 pointer/4B on 32-bit; 2 pointers/16B on 64-bit) if users could afford to test for small-mode vs. large-mode.
The current scheme works out to something like this:
```
template <class T, size_t SmallCapacity>
struct SmallVector {
T