Another Python rookie trying to port to C/C++ question.

Brian Quinlan brian at sweetapp.com
Thu Sep 25 18:19:00 EDT 2003


> 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






More information about the Python-list mailing list