NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: memove performance of NetBSD
Hi,
Thor Lancelot Simon <tls%panix.com@localhost>:
> On Thu, Jan 28, 2010 at 11:08:16AM +0530, Channa wrote:
>>
>> I verified the current implementation , the copy operation or move
>> operation is done word by word.
>>
>> I have modified the algorithm as below:
>> <1> Align the source if not aligned by copying only few bytes to destination
>> <2> Copy 4 words at a time.
>>
>> I verified the modification with the performance of memmove for
>> aligned and unaligned combination, the performance does not degrade
>> for unaligned access.
>
> Does the performance actually improve in any case? If so, does it still
> improve if you remove the hand-unrolling of the loop?
>
> I'm shocked that the compiler can't unroll the loop by 4 for you.
>
Yes the performance improves when the memmove is done as below:
memmove(dst, src+1, sizeof(src));
memmove(dst, src+2, sizeof(src));
memmove(dst, src+3, sizeof(src));
If I remove the hand unrolling of the loop (as done in the patch) the
performance does not improve.
I referred the implementation given in the below link:
http://www.vik.cc/daniel/portfolio/memcpy.htm
I am not sure why this behavior.
So wanted to confirm with the mailing list opinion on the same.
Thanks & Regards,
Channa
Home |
Main Index |
Thread Index |
Old Index