Re: [ovs-dev] [PATCH] bitmap: Optimize bitmap_equal and bitmap_scan

2014-07-29 Thread Kmindg G
On Tue, Jul 29, 2014 at 1:01 AM, Ben Pfaff wrote: > Needs a sign-off. > Oh.. I will not forget it in the next version. > > I'm pretty sure that bitmap_equal() is wrong: doesn't it access one > past the end of the bitmap arrays? You are right. I'll fix it. > I think that rightmost_1bit_idx

Re: [ovs-dev] [PATCH] bitmap: Optimize bitmap_equal and bitmap_scan

2014-07-28 Thread Ben Pfaff
Needs a sign-off. I'm pretty sure that bitmap_equal() is wrong: doesn't it access one past the end of the bitmap arrays? I think that rightmost_1bit_idx() might make bitmap_scan() faster. The nice thing about the previous implementations was that they were obviously correct. Now, I'd prefer to

[ovs-dev] [PATCH] bitmap: Optimize bitmap_equal and bitmap_scan

2014-07-26 Thread Kmindg
--- lib/bitmap.c | 36 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/lib/bitmap.c b/lib/bitmap.c index 7889aa1..b62a8be 100644 --- a/lib/bitmap.c +++ b/lib/bitmap.c @@ -65,16 +65,17 @@ bool bitmap_equal(const unsigned long *a, const unsigned