Depth-1:
- pointer to OwnedData -> Flexible Array Member Data (not resizable)
- cons: not resizable
- cons: old references to the data structure must be updated if resize happens
- pro: can be allocated on stack-only if size = 0
- pro: eliminates one level of pointer indirection
Depth-2:
- pointer to OwnedData -> pointer to OwnedData (can be swapped during resize) -> Flexible Array Member
- pros: resizable
- pros: old references to the data structure are always up to date
- cons: must allocate heap data, even if size = 0
- cons: adds one level of pointer indirection
Yes, this is nice in theory, but HOW FAST IS IT? What is the actual performance improvement?