bit count or bit set && Python3
rosuav at gmail.com
Thu Oct 25 18:29:37 CEST 2012
On Fri, Oct 26, 2012 at 3:17 AM, rusi <rustompmody at gmail.com> wrote:
> On Oct 25, 8:57 pm, Steven D'Aprano <steve
> +comp.lang.pyt... at pearwood.info> wrote:
>> py> min(t.repeat(number=10000, repeat=7))
>> py> min(t.repeat(number=100, repeat=7))
>> That makes the "inelegant" solution using bin() and count() about 600
>> times faster than the mathematically clever solution using bitwise
> You meant 600% I think?
It took six times longer to do one hundredth the iterations.
More information about the Python-list