To see why that's the case, consider a large vector of capacity C.
getting paid the big bucks to consider a large vector of capacity C
@astraleureka holy shit
It doesn't take a rocket surgeon to figure out that an allocator- aware std::vector would be a marriage made in heaven:
@astraleureka this is remarkable
C++'s assumption of non-relocatable values hurts everybody for the benefit of a few questionable designs
The C intrinsics work around this by reversing the element ordering in vectors before & after each intrinsic. We need to do the same in stdarch.
@hipsterelectron like. yes allocs are *relatively* expensive, but that can be amortised by design in the vast majority of cases, no?? if you're parsing a format or a protocol that really does leave you in the dark as to the potential size of buffers needed until the very last moment, that sucks, but that thankfully isn't the only scenario that exists??? trying to play games with handing out little extra servings on an allocation seems to run against the much more common case where the allocation is sized (semi)ideally up front or you're in an environment where the buffer can be doubled if needed, or whatever.
also i have a whole load of other questions about how this unexpected baker's allocation (extra bytes cuz ur such a good consumer) would play out in environments where pointers aren't just dumb (e.g. MTE), i think that gets brought up in the thread a few times but i don't remember what was actually said and frankly i'm not diving into that tonight