This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients joern, rhettinger, serhiy.storchaka
Date 2015-02-26.08:53:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Applied optimizations:

1) Used cached get() method instead of indexing. This optimization already was used in update() and subtract().
2) _keep_positive() is optimized for the case when most counts are not positive (common case for substraction and intersection).
3) __add__ and __or__ are defined via inplace operations which are faster (due to fast copying and _keep_positive()).
4) Inlined and simplified the code for __pos__ and __neg__.

May be following optimization can be made by implementing _keep_positive() in C.
Date User Action Args
2015-02-26 08:53:28serhiy.storchakasetrecipients: + serhiy.storchaka, rhettinger, joern
2015-02-26 08:53:28serhiy.storchakasetmessageid: <>
2015-02-26 08:53:28serhiy.storchakalinkissue23509 messages
2015-02-26 08:53:28serhiy.storchakacreate