I recently heard about nedtries and decided to try implementing them, but something bothers me about the complexity of their search operation; I can’t stand why they are supposed to be so fast.
From what I understood, the expected complexity of their search operation should be
O(m/2) with m the size of the key in bits.
If you compare it to the complexity of the search operation in a traditional binary tree,
you get:
log2(n) >= m/2
Let’s the key be 32bits long: log2(n) >= 16 <=> n >= 65536
So nedtries should be faster than binary trees starting from 65536 items.
However, the author claim they are always faster than binary tree, so either my assumption
on their complexity is wrong or the computations performed at each step of the search are vastly faster in a nedtrie.
So, what about it?
If you have smaller trees, you can use smaller keys!