]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Optimize try/except ordering in sets.py.
authorRaymond Hettinger <python@rcn.com>
Wed, 21 Aug 2002 01:35:29 +0000 (01:35 +0000)
committerRaymond Hettinger <python@rcn.com>
Wed, 21 Aug 2002 01:35:29 +0000 (01:35 +0000)
commitde6d6979873b9e7d8066463dff8af4cc65e14e31
tree1e2029f1de5a11b208b02f6ea0739ed9e7b7ccde
parentede3a0da8bb9eb8230b0e3232a1cdb076b6e32ac
Optimize try/except ordering in sets.py.

Gains a 5:1 speed-up for membership testing by
handling the most common case first (the case
where the element is hashable).

Closes SF Patch 597444.
Lib/sets.py