Fully transitive const is not necessary

Bill Baxter dnewsgroup at billbaxter.com
Sun Apr 27 17:05:28 PDT 2008


Lars Ivar Igesund wrote:
> Sascha Katzner wrote:
> 
>> Walter Bright wrote:
>>> Most operations are slicing/concatenating, which work just fine on
>>> invariant strings.
>> Correct me if I'm wrong, but if you want to concatenate two invariant
>> strings, you have to allocate a new buffer. Isn't that a possible speed
>> penalty compared to regular strings? 
> 
> Indeed it is, and this is the main reason for Tango being so damn fast at
> text processing.

But note that Tango also is suffering from bugs now that are due to that 
design choice (i.e. the choice to require pre-allocation for almost all 
text processing functions).

http://www.dsource.org/projects/tango/ticket/787
http://www.dsource.org/projects/tango/ticket/978

--bb



More information about the Digitalmars-d mailing list