Arc.Tango

Lars Ivar Igesund larsivar at igesund.net
Thu Sep 6 13:38:52 PDT 2007


Bill Baxter wrote:

> You make a lot of good points on that page.
> 
> Have you (or anyone) tested the performance of the tango containers?
> I'm concerned about the performance impact of all iterators being
> heap-allocated, interface-accessed things, but I suspect there are ways
> to work around that (maybe using opApply's or scope'ing iterators).
> 
>  From a quick look it appears that opApply scope allocates and uses the
> actual iterator type, thus avoiding both the heap and virtual calls.
> But the iterator returned by .elements is a heap-allocated generic
> interface pointer.  On the other hand opApply will have to go through a
> few delegate calls to get at your loop body.  So anyway, it's not
> exactly clear to me what price I end up having to pay at the pump vs a
> more STL-like thinly-veiled-pointers approach.

For various reasons, the Tango team also thinks that the containers probably
could be more optimal, mostly because they were not originally written in
D. In unofficial tests reported on #d.tango, the Tango containers seems to
be comparable to STL, though.

-- 
Lars Ivar Igesund
blog at http://larsivi.net
DSource, #d.tango & #D: larsivi
Dancing the Tango



More information about the Digitalmars-d-announce mailing list