Vadim Stadnik | 27 Jun 2012 11:29
Picon

[stl_ext_adv] array based B+ tree

Hi all,

First of all, I would like to thank all Boosters for previous useful
discussion of dynamically allocated augmented B+ trees. The development of
the new array based variant of a B+ tree has been significantly influenced
by these comments and suggestions.

The problem of the C++ standard sequences based on linear data structures
is that every of them has at least one inefficiency, such as linear cost of
insert(), erase() functions of std::vector or slow bidrectional iterators
of std::list. These inefficiencies create performance bottlenecks and
significantly complicate the development of efficient general algorithms
based on STL sequences.

The new variant of an array based B+ tree offers a solution to these
problems of STL sequences by reducing the running time of inefficient
operations from linear to logarithmic in the worst case. The array based B+
tree implements a simple partition of an array into a list of sub-arrays
connected to a B-tree. Compared to dynamically allocated B+ trees the new
tree requires less space and improves locality of reference. In some aspect
the array based B+ tree represents an enhanced pool allocator. Performance
of the new tree has been optimized for container operations with large
numbers of elements. In a number of tests the improvement factor is about
10.

A significant advantage of the array based B+ tree over standard sequences
is the support of splice() functions with logarithmic running time in the
worst case. The high efficiency of these functions extends move semantics
for non-intrusive STL sequences, since they allow user algorithms to insert
and remove any range of consecutive elements. This high efficiency is not
(Continue reading)


Gmane