add a bitequal() function - #8
Conversation
bgruening
commented
Apr 19, 2013
Hi Ilan, any chance to get this merged? |
bgruening
commented
Sep 16, 2014
Is there anything I can do to get this PR merged? |
andre-merzky
commented
Oct 22, 2016
Hey @bgruening, this repo has been silent for quite a while, and we thus created a fork at https://github.com/diamondman/bitarray/. If you are interested, please feel free to transplant your pull request to the forked repo, we would be very happy to begin the code review and merge into bitarray before pushing out a new release. If you do not have the time to do so, we would kindly ask your permission to do the PR transfer our-self. If you could ping back in the next couple of days, one way or the other, that would be great. Many thanks! |
bgruening
commented
Oct 23, 2016
@andre-merzky thats great to hear! I'm travelling the next days, so if you can take this PR over feel free to do so. Hopefully, it's useful! |
andre-merzky
commented
Oct 23, 2016
Thanks for the note, @bgruening - we'll do that then, and will ping back. Take care :) |
diamondman
commented
Oct 24, 2016
Hmm, isn't #!/usr/bin/env pythonimportbitarrayimportrandomimporttimeimportsysn=1024*1024*1024ba=bitarray.bitarray(n)
t_0=time.time()
foriinrange(1000*1000):
ba.setrange(i*1000, i*1000+999, True)
t_1=time.time()
printba.count()
t_2=time.time()
print'timer 1: %5.2f'% (t_1-t_0)
print'timer 2: %5.2f'% (t_2-t_1)gives $ python ./test.py
1000000000
timer 1: 0.53
timer 2: 0.05On Tue, Nov 22, 2016 at 1:51 PM, Rémi Adon notifications@github.com wrote:
|
ow thank you @andre-merzky , my bad |
I added a bitequal() function to calculate the same as (a & b).count().
Thanks for this great library.
Björn