Why is `Appender._data` a pointer to its `Data`-store?

Per Nordlöw per.nordlow at gmail.com
Fri Oct 16 21:40:31 UTC 2020


Why is `Appender`'s store `Data` put directly as

     `private Data* _data;`

instead of

     `private Data _data;`

?

Removing the pointer indirection would give better locality.

If it's about optimizing for empty `Appender`s then a `Appender*` 
should be used in those cases instead.


More information about the Digitalmars-d-learn mailing list