Is all this Invarient **** er... stuff, premature optimisation?

Christopher Wright dhasenan at gmail.com
Mon Apr 28 21:41:04 PDT 2008


Robert Fraser wrote:
> The important part is new String(offset + beginIndex, endIndex - 
> beginIndex, value) which does indeed do a "slice" of sorts (that is, it 
> returns a string with the same char array backing it with a new offset 
> and length). No copying of data is done.

Sun has it right. GNU Classpath has it wrong and copies the data every time.



More information about the Digitalmars-d mailing list