Dynamic arrays in D 1.0
Bill Baxter
dnewsgroup at billbaxter.com
Sun May 11 14:05:51 PDT 2008
Janice Caron wrote:
> On 11/05/2008, Bill Baxter <dnewsgroup at billbaxter.com> wrote:
>> std.algorithm's copy(), in its current form, will be less efficient because
>> it copies elements one-at-a-time in a loop.
>
> That may be what the source code does, but it's the compiler's job to
> optimize. If it doesn't, I blame the compiler :-)
>
> Also, memmove can't be used in CTFE.
Does std.algorithm.copy work in CTFE?
>> Anyway, the existence of such subtleties is why things like erase
>> should just be in the darn standard library so the problem only has
>> to be solved once.
>
> I agree.
>
> Although, that said, I don't think anyone's really considered it a
> "problem" before now.
http://d.puremagic.com/issues/show_bug.cgi?id=473
--bb
More information about the Digitalmars-d
mailing list