Comment Re:10,000 URLs? (Score 1) 193
You are partially right. There is no free lunch in the universe. The cost of computing a perfect hash is, I vaguely recall, on the order of O(n lg n). The point is, no matter how big the results get, calculating the array offset into the table is still O(1). In other words, it's just as cheap to add 2 to 4 as it is to add it to 4000000000000. Since this table will probably be accessed an order of magnitude more often than it will be written, it makes sense to pay for the load on the update side, rather than the access side.