lkml.org 
[lkml]   [2011]   [Nov]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: Fast memcpy patch
    From
    On Wed, Nov 23, 2011 at 7:25 PM, N. Coesel <nico@nctdev.nl> wrote:
    > Dear readers,
    > I noticed the Linux kernel still uses a byte-by-byte copy method for memcpy.
    > Since most memory allocations are aligned to the integer size of a cpu it is
    > often faster to copy by using the CPU's native word size. The patch below
    > does that. The code is already at work in many 16 and 32 bit embedded
    > products. It should also work for 64 bit platforms. So far I only tested 16
    > and 32 bit platforms.

    Which arch are you referring?

    At least on x86, it has optimized memcpy(), see arch/x86/lib/memcpy_32.c
    and arch/x86/include/asm/string_64.h.


    \
     
     \ /
      Last update: 2011-11-23 13:11    [W:4.364 / U:0.016 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site