A few thoughts on std.allocator

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Sun May 10 09:44:36 PDT 2015


On 5/10/15 3:51 AM, Michel Fortin wrote:
> Shared is implicit in the case of immutable. Think carefully: if you
> implement this and it has any efficiency benefit for non-shared
> allocations, const-allocated objects and arrays will become more
> performant than immutable-allocated ones. People will thus have an
> incentive to stay away from immutable.

Good point. Well I'd say if things turn out that way, we shouldn't 
pessimize one case just to keep it aligned with another. There might be 
optimization opportunities particular to immutable data. -- Andrei



More information about the Digitalmars-d mailing list