Hi, On Mon, Jul 21, 2014 at 04:39:05PM +0200, Pavel Machek wrote: > So you reduced O(n) to O(n/2 log(n)) ... that's still O(n log(n)), right?
Radix trees have a memory complexity of ~O(n + log(n)). We have an additional log(n) space requirement for the tree itself, but we linearly safe memory for each node compared to the old implementation. Since n beats log(n) at some point there is a point where we need less pages with the new code than with the old. That break-even point is somewhere around 32GB of RAM, for smaller sizes we need 2 additional pages at most. > > > You can also modify the above tool to give you some data to plot, then > > you will also SEE that there is still a linear relationship between RAM > > size and memory required by the old and new memory bitmap > > implementation. > > I believe radix tree is O(log(N)) per operation, but its memory is > certainly not linear. Numbers beat believes. Joerg -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/