a...@pythoncraft.com (Aahz) writes: > That reminds me: one co-worker (who really should have known better ;-) > had the impression that sets were O(N) rather than O(1).
For settling exactly this kind of confusion, Python's standard library comes with a module, the ‘timeit’ module. Your co-worker should have known better: don't guess about timing performance, measure it. Or am I missing something here? -- \ “If you don't know what your program is supposed to do, you'd | `\ better not start writing it.” —Edsger W. Dijkstra | _o__) | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list