http://d.puremagic.com/issues/show_bug.cgi?id=1339





------- Comment #8 from 2kor...@gmail.com  2009-02-19 18:06 -------
(In reply to comment #7)
> Oh yes.  Increasing .length always reallocates under 2.025, whether const,
> invariant or not.  The problem is that concatenation doesn't.
> 

Do you say that the following:
char[] s;
for (int i = 0; i < 10_000_000; ++i) {
    s ~= '0';
    // or:
    // s.length = s.length + 1; 
    // s[$-1] = '0';
}

will reallocate on *each* iteration?
While this solves one issue, it opens another one - big performance drop
(create new report?)


-- 

Reply via email to