COW vs. in-place.
Dawid Ciężarkiewicz
dawid.ciezarkiewicz at gmail.com
Mon Jul 31 14:34:14 PDT 2006
Dave wrote:
> Dawid Ciężarkiewicz wrote:
>> I'd rather wait till const/immutability in D problem will be resolved.
>> Don't forget that additional "option" is runtime cost. There are some
>> propositions of const/immutability that could help providing compile time
>> information to deal with your proposition.
>
> It would take many calls to the modified toupper to cost as much as
> needlessly duplicating one large text file, and now you have to either
> live with the dups or write your own in-place toupper <g>
Yes. Still - I'd rather see duplicated functions for that or something like
it (just to have it in compile time).
> None of the const/immutability ideas will take care of having to "copy
> on write"; they were all more-or-less just ways of enforcing COW so
> there wouldn't be mistakes.
Well, right.
Maybe just writting new module (std.strinplace) that do what you want and
then sending it to Walter/D discussion group is good . I guess with newday
import improvements names could stay like they were and people interested
in this speedup would statically import this module and use FQN where they
want such behavior.
More information about the Digitalmars-d
mailing list