Array Appending and DRuntime

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Sat Apr 25 15:11:58 PDT 2009


bearophile wrote:
> dsimcha:
>> DMD 2.019 (Last release before druntime):  42 milliseconds.
>> DMD 2.020 (First release with druntime):  ~1000 milliseconds.
>> DMD 2.029 (Current version):  ~1000 milliseconds.
>> DMD 2.029 (Replacing ~= with the Appender struct):  18 milliseconds.
>> DMD 2.029 (Replacing builtin array with rangeextra.TNew):  19 milliseconds.
> 
> I have done some more timings:
> 
> Timings, appending 100_000_000 uints, seconds:
>   DMD 1.042:                 7.51
>   DMD 1.042, ArrayBuilder:   1.81
>   DMD 2.029:                 a lot
>   DMD 2.029, Appender:      22.83

I'm not sure on what machine you test, but on my (crappy old) laptop, 
your Appender example completes in 4.95 seconds. Are you sure you are 
measuring the right thing?

Andrei



More information about the Digitalmars-d mailing list