This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
REC: Optimization for stl_tree.h
- From: Dhruv Matani <dhruvbird at gmx dot net>
- To: libstdc++ <libstdc++ at gcc dot gnu dot org>
- Date: 12 Feb 2004 19:00:08 +0530
- Subject: REC: Optimization for stl_tree.h
- Organization:
I'd like to know the opinion of the implementors of rb_tree and
otherwise on the likelyhood of the following being conformant, and being
accepted if done:
Create 2 base classes: (A) _Rb_tree_node_alloc_base and (B)
_Rb_tree_count_cmp_base each having the responsibility of maintaining:
(A)_Rb_tree_node_alloc_base: _Rb_tree_node_base and derives from the
allocator, and:
(B)_Rb_tree_count_cmp_base: _M_node_count and derives from
_M_key_compare.
Because the comparison function would most likely be empty as well.
At first sight, it looks a bit ugly to me, but it has its benefits.
--
-Dhruv Matani.
http://www.geocities.com/dhruvbird/