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, socketpair, vstinner, yselivanov
Date 2016-02-12.19:40:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1455306029.66.0.985973467411.issue26342@psf.upfronthosting.co.za>
In-reply-to
Content
> Does this patch have effect with results over 8 bits? 

-m timeit -s "x=2**40" "x&2;x&2;x&2;x&333;x&3;x&3;x&4444;x&4"
with patch: 0.404usec      without patch: 0.41


> Does it have effect after applying patches from 24165?

I'm not sure how it's related, but let's modify the test to stress the mem allocation:

-m timeit -s "x=21827623" "(x+x)&2;(x+x)&2;(x+x)&2;(x+x)&333;(x+x)&3;x&3;(x+x)&4444;(x+x)&4"

this patch+freelist: 0.337usec       only freelist: 0.496

In any case, bit operations are often used for bit-flags logic, where numbers are usually aren't too big (it's rare to see more than 30 bit flags on one field).
History
Date User Action Args
2016-02-12 19:40:29yselivanovsetrecipients: + yselivanov, mark.dickinson, vstinner, socketpair, serhiy.storchaka
2016-02-12 19:40:29yselivanovsetmessageid: <1455306029.66.0.985973467411.issue26342@psf.upfronthosting.co.za>
2016-02-12 19:40:29yselivanovlinkissue26342 messages
2016-02-12 19:40:29yselivanovcreate