performance: memcpy vs. __copy_tofrom_user

Bill Gatliff bgat at billgatliff.com
Thu Oct 9 02:39:31 EST 2008


Dominik Bozek wrote:
> Hi all,
> 
> I have done a test of memcpy() and __copy_tofrom_user() on the mpc8313.
> And the major conclusion is that __copy_tofrom_user is more efficient
> than memcpy. Sometimes about 40%.

Have you looked at the two implementations?  I'm not as well-versed on PPC as
ARM, but I know the latter's __copy_* functions are optimized to be almost
unintelligible.  If your benchmark memcpy() implementation isn't, then you
aren't comparing apples-to-apples.

40% improvement is within what I could imagine getting from a hand-crafted,
no-holds-barred memcpy() implementation.  I'd look more carefully at that code.


b.g.
-- 
Bill Gatliff
bgat at billgatliff.com


More information about the Linuxppc-embedded mailing list