Array append performance 2

Dave Dave_member at pathlink.com
Tue Sep 2 17:01:11 PDT 2008


"bearophile" <bearophileHUGS at lycos.com> wrote in message 
news:g9i1nb$26pd$1 at digitalmars.com...
> Benji Smith:
>> Philosophically, though, isn't the whole purpose of having dynamic
>> arrays in D to avoid having to create library implementations like this?
>
> I agree, but so far I am not able to modify/improve the language. And an 
> ArrayBuilder isn't meant to replace dynamic arrays, it's just a way to 
> build them faster, "patching" what I perceive as one of their problems.
>

There have been quite a few examples of contributors modifying the D runtime 
to improve things like array concatenation. If it generally performs better 
and is demonstrably correct, I'm pretty sure Walter and the Tango crew would 
incorporate it.

In other words, have a go at improving the arraycat code in internal/gc/gc.d 
if you have the time. It's simple enough to modify and build.

>
>> I can definitely appreciate how something like this provides
>> proof-of-concept for compiler & stdlib improvements,
>
> My libs are meant to improve std libs, if/where/when the compiler can't be 
> modified. They are un-standard but they are largish libs anyway, and I'm 
> developing them doing my best :-)
>
> Bye,
> bearophile 




More information about the Digitalmars-d mailing list