Memory hierarchies since the 1990s have broadened the relevance of 1970s 
practical wisdom for disk storage. A solid hash table with locality and solid 
B-Tree often win today. A great stdlib should have both.

A more obscure bonus of a B-Tree (when compared to, say, balanced binary trees) 
is cheaper amortized cost to maintain simultaneous access by rank (e.g. quickly 
find 95th percentile, top 10, etc. as well as query by key). With B-Trees you 
need only one rank counter per big node of O(M) elements instrumentation, not 
per element as with binary trees. So, B-Trees afford O(M)-times less space 
overhead and O(log(N)/log(M))-times less time overhead than a rank-instrumented 
binary tree of N elements. This can be useful for, e.g. tracking quantiles over 
moving data windows.

Reply via email to