Re: [ovs-dev] [PATCH v4 2/5] bitmap: add bitmap_count1 function

2013-12-09 Thread Alexander Wu
On 10/12/2013 04:50, Jarno Rajahalme wrote: On Dec 8, 2013, at 7:34 PM, Alexander Wu wrote: Hi Jarno, I get my gcc predefined __core2. But its performance seems to be worse when I add '-O2'. Not sure if it's the reality. From the numbers below it seems that performance is better with -O2

Re: [ovs-dev] [PATCH v4 2/5] bitmap: add bitmap_count1 function

2013-12-09 Thread Jarno Rajahalme
On Dec 8, 2013, at 7:34 PM, Alexander Wu wrote: > Hi Jarno, > > I get my gcc predefined __core2. But its performance seems to be worse when > I add '-O2'. Not sure if it's the reality. > >From the numbers below it seems that performance is better with -O2 (1063893 < >1317450), so I’m not sur

Re: [ovs-dev] [PATCH v4 2/5] bitmap: add bitmap_count1 function

2013-12-08 Thread Alexander Wu
On 07/12/2013 00:13, Jarno Rajahalme wrote: On Dec 6, 2013, at 1:18 AM, Alexander Wu wrote: Hi Jarno, I've read your patch "better count1_bits", and I test the gcc builtins separately. Call __builtin_popcount|__builtin_popcountl|__builtin_popcountll 10 million times ---

Re: [ovs-dev] [PATCH v4 2/5] bitmap: add bitmap_count1 function

2013-12-06 Thread Jarno Rajahalme
On Dec 6, 2013, at 1:18 AM, Alexander Wu wrote: > Hi Jarno, > > I've read your patch "better count1_bits", and I test the gcc > builtins separately. > > Call __builtin_popcount|__builtin_popcountl|__builtin_popcountll 10 million > times > -- >suse-kvm-o

Re: [ovs-dev] [PATCH v4 2/5] bitmap: add bitmap_count1 function

2013-12-06 Thread Alexander Wu
Hi Jarno, I've read your patch "better count1_bits", and I test the gcc builtins separately. Call __builtin_popcount|__builtin_popcountl|__builtin_popcountll 10 million times -- suse-kvm-of13:/test # time ./bit4 real0m0.034s user0m0.032s

Re: [ovs-dev] [PATCH v4 2/5] bitmap: add bitmap_count1 function

2013-12-05 Thread Ben Pfaff
On Fri, Dec 06, 2013 at 12:02:59PM +0800, Alexander Wu wrote: > Some additional test for bitmap performance (10 million loops): > > suse-kvm-of13:/test # time ./bit3 > > real0m0.061s > user0m0.060s > sys 0m0.000s > suse-kvm-of13:/test # time ./bit2 > > real

Re: [ovs-dev] [PATCH v4 2/5] bitmap: add bitmap_count1 function

2013-12-05 Thread Ben Pfaff
On Fri, Dec 06, 2013 at 10:39:21AM +0800, Alexander Wu wrote: > On 06/12/2013 01:47, Ben Pfaff wrote: > >On Wed, Dec 04, 2013 at 05:38:29PM +0800, Alexander Wu wrote: > >>V4: > >> Add bitmap_count1 function to count all 1 bits. > > > >I suggest using the count_1bits() function to speed this up. >

Re: [ovs-dev] [PATCH v4 2/5] bitmap: add bitmap_count1 function

2013-12-05 Thread Alexander Wu
On 06/12/2013 10:39, Alexander Wu wrote: On 06/12/2013 01:47, Ben Pfaff wrote: On Wed, Dec 04, 2013 at 05:38:29PM +0800, Alexander Wu wrote: V4: Add bitmap_count1 function to count all 1 bits. I suggest using the count_1bits() function to speed this up. Thanks, Ben. Hi Ben, Thanks f

Re: [ovs-dev] [PATCH v4 2/5] bitmap: add bitmap_count1 function

2013-12-05 Thread Alexander Wu
On 06/12/2013 01:47, Ben Pfaff wrote: On Wed, Dec 04, 2013 at 05:38:29PM +0800, Alexander Wu wrote: V4: Add bitmap_count1 function to count all 1 bits. I suggest using the count_1bits() function to speed this up. Thanks, Ben. Hi Ben, Thanks for your suggestion! I'll update the functi

Re: [ovs-dev] [PATCH v4 2/5] bitmap: add bitmap_count1 function

2013-12-05 Thread Ben Pfaff
On Wed, Dec 04, 2013 at 05:38:29PM +0800, Alexander Wu wrote: > V4: > Add bitmap_count1 function to count all 1 bits. I suggest using the count_1bits() function to speed this up. Thanks, Ben. ___ dev mailing list dev@openvswitch.org http://openvswitc