I've actually benchmarked the van Emde-Boas tree myself once. I compared it with an AA Tree, a hashmap and a bit array.
The tests perform size
inserts with random numbers in the interval [0, bound]
, then size
searches, then size
deletes and then again size
searches. Deletes are done on random numbers as well, so you first have to figure out if they are in the structure at all.
Here are the results (size
=2000000, bound
=10000000) in seconds:
AATreeLookup - O(n log n)
Inserting... 3.3652452
Searching... 5.2280724
Deleting... 7.3457427
Searching... 9.1462039
HashLookup - O(n) expected
Inserting... 0.3369505
Searching... 0.6223035
Deleting... 0.9062163
Searching... 1.1718223
VanEmdeBoasTree - O(n log log n)
Inserting... 0.7007531
Searching... 1.1775800
Deleting... 1.7257065
Searching... 2.2147703
ArrayLookup - O(n)
Inserting... 0.0681897
Searching... 0.1720300
Deleting... 0.2387776
Searching... 0.3413800
As you can see, van Emde-Boas trees are about twice as slow as hash maps, ten times as slow as bit arrays, and 5 times as fast as binary search trees.
Of course the above needs a disclaimer: the tests are artificial, you can possibly improve the code or use a different language with a compiler whose output is faster, and so on and so forth.
This disclaimer is at the heart of the reason we use asymptotic analysis in algorithms design: as you have no idea what the constants are and as the constants can change depending on environmental factors, the best we can do is an asymptotic analysis.
Now, in the case of $\log n$ versus $\log \log n$: in the above example, my van Emde-Boas tree is able to contain $2^{32}$ elements. $\log 2^{32} = 32$, and $\log 32 = 5$, which is a factor 6 improvement, which is quite a bit in practice. Additionally, van Emde-Boas trees have good constant factors (it's all about constant factors in practice for differences this small) as they don't need to balance themselves.