Arc.Tango

Sean Kelly sean at f4.ca
Thu Sep 6 15:10:36 PDT 2007


Bill Baxter wrote:
> 
> 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).

I /really/ want a chance to work on containers someday soon, but I'd 
like to preserve the interface aspect for a few reasons:

* It makes the Tango implementation a framework to build on rather than 
a reference set of containers.
* Following from the previous point, it separates the container library 
interface from its implementation.
* It allows for Java-style (ie. runtime) container access as well as 
C++-style (ie. template-oriented) container access.

If structs are used as iterators there would be no way to prevent their 
being copied, and some things which could be described as iterators 
should not really be copyable (input iterators, ODBC cursors, etc). 
Also, there may be some merit in having iterator interfaces as well. 
But perhaps the virtual function calls here would be prohibitively 
expensive.  I would be interested to hear opinions on performance 
requirements related to this.


Sean



More information about the Digitalmars-d-announce mailing list