DIP 1014
Shachar Shemesh
shachar at weka.io
Sun Sep 30 07:35:28 UTC 2018
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
More information about the Digitalmars-d
mailing list