Array Appending and DRuntime

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Sat Apr 25 15:49:50 PDT 2009


bearophile wrote:
> Andrei Alexandrescu:
>> 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?
> 
> My purpose is to have a good standard library and a good language. 
> Errors of mine are always possible. Benchmarks are tricky things.
> 
> I have redone the tests, the CPU is unloaded, no computation is going
> on, the system is WinXP with 2 GB RAM, 2 GHz Core 2.
> 
> New timings give no less than 22.6 seconds, repeated. As running time
> I use a timing command similar to the "time" of Linux, that gives the
> total running time of the program (final deallocations too).
> 
> I think Appender can be improved some.

I can't improve what I can't measure. On my system, liberally loaded 
with a variety of programs, weaker than yours (1.8GHz/512MB laptop) I 
get 4.8s with -O and 5.3s without. The major difference is the OS 
(Ubuntu on my laptop), but I am puzzled as Appender doesn't assume a lot 
about the OS. I time with Unix time. I copied the code straight from 
your post. Please advise.

Andrei



More information about the Digitalmars-d mailing list