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 yselivanov
Recipients mark.dickinson, serhiy.storchaka, vstinner, yselivanov
Date 2016-02-11.19:33:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1455219238.31.0.545521585495.issue26342@psf.upfronthosting.co.za>
In-reply-to
Content
This patch implements a fast path for &, |, and ^ bit operations for single-digit positive longs.  We already have fast paths for ~, and pretty much every other long op.


-m timeit -s "x=21827623" "x&2;x&2;x&2;x&333;x&3;x&3;x&4444;x&4"
with patch: 0.181          without patch: 0.403


-m timeit -s "x=21827623" "x|21222;x|23;x|2;x|333;x|3;x|3;x|4444;x|4"
with patch: 0.241          without patch: 0.342


-m timeit -s "x=21827623" "x^21222;x^23;x^2;x^333;x^3;x^3;x^4444;x^4"
with patch: 0.241          without patch: 0.332
History
Date User Action Args
2016-02-11 19:33:58yselivanovsetrecipients: + yselivanov, mark.dickinson, vstinner, serhiy.storchaka
2016-02-11 19:33:58yselivanovsetmessageid: <1455219238.31.0.545521585495.issue26342@psf.upfronthosting.co.za>
2016-02-11 19:33:58yselivanovlinkissue26342 messages
2016-02-11 19:33:58yselivanovcreate