> Well, since I'm not worried about "flexible", have my doubts about the > "much slower" part, Your implementation is O(n) with the number of entries while the Python implementation is O(log(n)). If n is small then your implementation might be acceptably fast. Can't you just use the STL hash_map template class? Cheers, Brian