Re: [ovs-dev] [PATCH 3/3] lib/bitmap: Faster bitmap_scan().

2014-10-03 Thread Jarno Rajahalme
On Sep 26, 2014, at 2:09 PM, Ben Pfaff wrote: > On Wed, Sep 24, 2014 at 11:24:02AM -0700, Jarno Rajahalme wrote: >> Before: >> >> $ tests/ovstest test-bitmap benchmark 100 >> bitmap equal:328 ms >> bitmap scan: 8159 ms >> >> After: >> >> $ tests/ovstest test-bitmap benchmark 100

Re: [ovs-dev] [PATCH 3/3] lib/bitmap: Faster bitmap_scan().

2014-09-26 Thread Ben Pfaff
On Wed, Sep 24, 2014 at 11:36:57AM -0700, Jarno Rajahalme wrote: > Correcting myself: > > On Sep 24, 2014, at 11:24 AM, Jarno Rajahalme wrote: > > -unsigned long *bitmap_allocate1(size_t n_bits); > > +/* Initializes bitmap to all-1-bits and returns the bitmap pointer. */ > > +static inline void >

Re: [ovs-dev] [PATCH 3/3] lib/bitmap: Faster bitmap_scan().

2014-09-26 Thread Ben Pfaff
On Wed, Sep 24, 2014 at 11:24:02AM -0700, Jarno Rajahalme wrote: > Before: > > $ tests/ovstest test-bitmap benchmark 100 > bitmap equal:328 ms > bitmap scan: 8159 ms > > After: > > $ tests/ovstest test-bitmap benchmark 100 > bitmap equal:230 ms > bitmap scan:185 ms > > Sig

Re: [ovs-dev] [PATCH 3/3] lib/bitmap: Faster bitmap_scan().

2014-09-24 Thread Jarno Rajahalme
Correcting myself: On Sep 24, 2014, at 11:24 AM, Jarno Rajahalme wrote: > -unsigned long *bitmap_allocate1(size_t n_bits); > +/* Initializes bitmap to all-1-bits and returns the bitmap pointer. */ > +static inline void > +bitmap_init1(unsigned long *bitmap, size_t n_bits) > +{ > +size_t n_lon

[ovs-dev] [PATCH 3/3] lib/bitmap: Faster bitmap_scan().

2014-09-24 Thread Jarno Rajahalme
Before: $ tests/ovstest test-bitmap benchmark 100 bitmap equal:328 ms bitmap scan: 8159 ms After: $ tests/ovstest test-bitmap benchmark 100 bitmap equal:230 ms bitmap scan:185 ms Signed-off-by: Kmindg Signed-off-by: Jarno Rajahalme --- lib/bitmap.c | 102 ++