Message260196
> 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). |
|
Date |
User |
Action |
Args |
2016-02-12 19:40:29 | yselivanov | set | recipients:
+ yselivanov, mark.dickinson, vstinner, socketpair, serhiy.storchaka |
2016-02-12 19:40:29 | yselivanov | set | messageid: <1455306029.66.0.985973467411.issue26342@psf.upfronthosting.co.za> |
2016-02-12 19:40:29 | yselivanov | link | issue26342 messages |
2016-02-12 19:40:29 | yselivanov | create | |
|