New submission from Eugene Kapun <abacabadabac...@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 <rep...@bugs.python.org> <http://bugs.python.org/issue8425> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com