Array append performance 2
Benji Smith
dlanguage at benjismith.net
Mon Sep 1 17:05:17 PDT 2008
bearophile wrote:
> Well, a finished version of ArrayBuilder is in my libs, in the 'builders' module:
> http://www.fantascienza.net/leonardo/so/libs_d.zip
>
> I have already used it to replace the old string appending used in the putr() (printing functions) and now printing is about 2.5 times faster (and using it for that purpose is a way to perform hundreds of unit tests on ArrayBuilder), so I'm quite pleased.
>
> Bye, and thank you for all the help and answers (but more bugs can be present still),
> bearophile
Very cool.
Philosophically, though, isn't the whole purpose of having dynamic
arrays in D to avoid having to create library implementations like this?
I can definitely appreciate how something like this provides
proof-of-concept for compiler & stdlib improvements, but in the end,
having to rely on an array-builder class seems very non-D-ish.
Thoughts?
--benji
More information about the Digitalmars-d
mailing list