a tree can often be slower than a simple array for lookups, even if the tree is O(log n) and the array is O(n).