Performance: sets vs dicts.

Paul Rubin no.email at nospam.invalid
Mon Aug 30 21:14:32 EDT 2010


aahz at pythoncraft.com (Aahz) writes:
> Possibly; IMO, people should not need to run timeit to determine basic
> algorithmic speed for standard Python datatypes.

Indeed.  Alex Stepanov (designer of C++ Standard Template Library) was
emphatic that algorithm complexity assertions should be part of the
interface of any STL function:

 http://www.sgi.com/tech/stl/drdobbs-interview.html

He also said it should be part of the "unwritten contract" between the
module and its user, but I don't understand why he said "unwritten",
since in the C++ STL the complexity statements are part of the written
spec.



More information about the Python-list mailing list