[issue8425] a -= b should be fast if a is a small set and b is a large set

Eugene Kapun report at bugs.python.org
Fri Apr 16 19:19:42 CEST 2010


New submission from Eugene Kapun <abacabadabacaba at gmail.com>:

>>> small_set = set(range(2000))
>>> large_set = set(range(20000000))
>>> large_set -= small_set # Fast
>>> small_set -= large_set # Slow, should be fast
>>> small_set = small_set - large_set # Fast

----------
components: Interpreter Core
messages: 103343
nosy: abacabadabacaba
severity: normal
status: open
title: a -= b should be fast if a is a small set and b is a large set
type: resource usage
versions: Python 3.1

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8425>
_______________________________________


More information about the Python-bugs-list mailing list