Message260126
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 |
|
Date |
User |
Action |
Args |
2016-02-11 19:33:58 | yselivanov | set | recipients:
+ yselivanov, mark.dickinson, vstinner, serhiy.storchaka |
2016-02-11 19:33:58 | yselivanov | set | messageid: <1455219238.31.0.545521585495.issue26342@psf.upfronthosting.co.za> |
2016-02-11 19:33:58 | yselivanov | link | issue26342 messages |
2016-02-11 19:33:58 | yselivanov | create | |
|