[issue43464] set intersections should short-circuit

2022-04-06 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.11 -Python 3.10 ___ Python tracker ___

[issue43464] set intersections should short-circuit

2022-04-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 31cd25f4e17cd68487dc76c1b2ec162a646818c2 by Serhiy Storchaka in branch 'main': bpo-43464: Optimize set.intersection() for non-set arguments (GH-31316) https://github.com/python/cpython/commit/31cd25f4e17cd68487dc76c1b2ec162a646818c2

[issue43464] set intersections should short-circuit

2022-02-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See also issue46721. set.issuperset() can get similar optimization. And set.issubset() will benefit from this optimization if use set.intersection() in issue46705. -- keywords: -patch stage: patch review ->

[issue43464] set intersections should short-circuit

2022-02-13 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch nosy: +serhiy.storchaka nosy_count: 2.0 -> 3.0 pull_requests: +29477 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31316 ___ Python tracker

[issue43464] set intersections should short-circuit

2021-03-10 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue43464] set intersections should short-circuit

2021-03-10 Thread Josh Rosenberg
New submission from Josh Rosenberg : At present, set_intersection (the C name for set.intersection) optimizes for pairs of sets by iterating the smallest set and only adding entries found in the larger, meaning work is proportionate to the smallest input. But when the other input isn't a