New string implementation: dstring 1.0

Chris Miller chris at dprogramming.com
Tue Oct 24 03:48:02 PDT 2006


On Tue, 24 Oct 2006 06:20:44 -0400, Fredrik Olsson <peylow at gmail.com>  
wrote:

> Chris Miller skrev:
> <snip>
>>> I agree that it should be putted in Phobos immediately! (Maybe just  
>>> some optimalizations with string size could be added, so adding one  
>>> dchar to char[] string will not cause conversion from char[] to  
>>> dchar[], but rather dchar to char).
>>  But then it won't be ultra fast at finding dchar codepoints.
>
> A little thought. Two bits are now used to represent the internal  
> format, but there are only three formats available. Maybe the fourth  
> format code could be "size optimal, but slightly slower"?
>
> I mean, just what else should quad 2ghz machines do? :)

Neat idea. Currently it uses that 4th state to represent an uninitialized  
string, but that's not so important. I'll think about this.



More information about the Digitalmars-d-announce mailing list