RFC on range design for D2

bearophile bearophileHUGS at lycos.com
Wed Sep 10 07:29:33 PDT 2008


Andrei Alexandrescu:
> That's odd. The array appender should never, by definition, do 
> significantly worse than the straight array append.

But the reality of your code and benchmarks may differ from the abstract definition :-)


> I think some other factor intervened (e.g. swapping). Also don't forget to
> compile with -O -release -inline and to test several times after a warmup run.

I have kept an eye on such things too. Note that benchmarks are generally tricky.

I am using DMD v1.035, on a Core Duo 2 GHz, 2 GB RAM, on Win, the code doesn't make HD swap, and timings are warm. My timings are repeatable within 0.02-0.03 seconds on my PC.
If you want I can give you the whole testing code, of course. But it's just the builders.d module of my libs plus the added testing code I have shown you.

Anyway, in the end it doesn't matter much, I think.

Bye,
bearophile


More information about the Digitalmars-d-announce mailing list