dcollections version 0.02
Steven Schveighoffer
schveiguy at yahoo.com
Wed Aug 6 06:39:17 PDT 2008
"maelp" wrote
>> You can find a very efficient stack in the new Tango containers.
>
> This raises the questions:
> a. How does the structures from dcollection and Tango compare, in terms of
> integration to tango, speed, memory efficiency, richness of API?
At the moment, Tango is more efficient for speed when using keys or values
that do not have GC pointers. When using keys or values that do have GC
pointers, dcollections is more efficient, however, i have submitted a ticket
for Tango to include the allocator I use in dcollections to make this more
efficient, and then I think Tango will have the edge in performance.
However, I plan at some point to implement the same allocators in
dcollections that Tango uses for the non-GC pointer types. At this time,
Tango probably still will have the edge in performance because of the design
of it.
> b. Why aren't the efforts of both libraries combined ? Dcollection is
> maybe not mature enough ? Are there plans to merge them if dcollections
> happen to be more efficient ?
The two libraries have different design goals. My design is much closer to
C++'s containers, and I made sure all of dcollection's containers can be
iterated in both directions, and the cursors were the main mode of operation
when operating on the containers. Tango's containers focus on speed and
efficiency, while ease of iteration is a secondary goal (I'm only guessing
here, as I didn't design it, but it appears that way).
However, as a contributor to Tango, I'll always try to contribute any new
ideas I have with dcollections as long as it fits within the design of
Tango's containers.
I doubt that dcollections will ever be more efficient than Tango's
containers, but I still plan on maintaining it because I prefer the
interface. Complexity-wise, they should be about the same.
-Steve
More information about the Digitalmars-d-announce
mailing list