[v3] policy-based data structures, round two

Benjamin Kosnik bkoz@redhat.com
Wed Jun 14 23:05:00 GMT 2006


Hey!

This is something fun. Here's an update to the policy-based associated
containers that are in mainline, currently as include/ext/pb_assoc. 

This time, the testing frameworks are being checked in as well. In
addition, there are new types and docs, etc. As of now, the containers
included are: basic_tree, tree (red-black, splay, ordered-vector),
trie, basic_hash_table, (chaining) cc_hash_table, (probing)
gp_hash_table, priority_queue (composed of pairing, binomial, binary,
or thin heaps), list, and maps, sets, and multi-* formed from these
combinations.

Phew! 

Some of the documentation details use cases where these containers
offer significant speed or memory advantages over the existing std::
and std::tr1 equivalents. We're interested in feedback and experiences
with these containers, and hope this will be useful for thinking about
containers for C++0x.

To avoid confusion, this will be checked in as pb_ds instead of the old pb_assoc directory names. As of now, pb_assoc is deprecated.

We've been working on this on and off for a while, and are quite
pleased to share these improvements.

There are a couple things that need to be cleaned up from here.
However, these can happen later, and initial feedback from Paolo and
Matt was uniformly positive, so I am checking this in now.

Paolo has indicated that there is still the long standing issue of
hash_prime_size_policy_imp.hpp not being ready for 64-bit machines. I'm
hoping for his help in fixing this....

Longer term:

Build wise, "make check-performance" and "make doc-performance" are a bit
vague with the dependencies. 

I'd like to fully convert the performance testing to a converged and
coherent typelist framework.

Similarly for the doc stuff...

This patch is pretty ungainly because of the deletions. As applied:
http://people.redhat.com/bkoz/p.20060614-pb_ds.bz2

tested on x86/linux
tested on x86_64/linux
tested on powerpc64/linux

-benjamin



More information about the Libstdc++ mailing list