public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <levinsasha928@gmail.com>
To: "N. Coesel" <nico@nctdev.nl>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Fast memcpy patch
Date: Wed, 23 Nov 2011 14:10:41 +0200	[thread overview]
Message-ID: <1322050241.3581.15.camel@lappy> (raw)
In-Reply-To: <CPSMTPM-CMT101y332G000633f8@CPSMTPM-CMT101.kpnxchange.com>

On Wed, 2011-11-23 at 12:25 +0100, N. Coesel 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.

[snip]

memcpy (along with other mem* functions) are arch specific - for
example, look at arch/x86/lib/memcpy_64.S for the implementation(s) for
x86.

The code under lib/string.c is simple and should work on all platforms
(and is probably not being used anywhere anymore).

-- 

Sasha.


  parent reply	other threads:[~2011-11-23 12:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-23 11:25 Fast memcpy patch N. Coesel
2011-11-23 11:45 ` Mihai Donțu
2011-11-23 12:07   ` N. Coesel
2011-11-23 12:06 ` richard -rw- weinberger
2011-11-23 12:07 ` Cong Wang
2011-11-23 12:10 ` Sasha Levin [this message]
2011-11-23 12:51   ` N. Coesel
2011-11-23 13:04     ` Sasha Levin
2011-11-23 20:38       ` N. Coesel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1322050241.3581.15.camel@lappy \
    --to=levinsasha928@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nico@nctdev.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox