Thread (25 messages) flat view 25 messages, 9 authors, 2008-10-15

Re: performance: memcpy vs. __copy_tofrom_user

From: Bill Gatliff <hidden>
Date: 2008-10-08 16:10:42

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@billgatliff.com
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help