On 30/09/18 10:26, Manu wrote:

Other implementations make much better use of that built-in space by
not wasting 8 bytes on an interior pointer for small-strings.


I will point out that a pointer that *sometimes* points to an internal member was one of the use cases I documented when I submitted the DIP.

Starting a long discussion about the merits of the design is a bit off-topic. I will point out that branch prediction considerations *might* make this a wise choice, despite the loss of 8 bytes of potential storage.

Either way, this is a design that is highly sensitive to precise use pattern, which, admitably, GNU's std::string probably can't know.

Shachar

Reply via email to