public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Clemens Koller <clemens.koller@anagramm.de>
To: Adrian Bunk <bunk@stusta.de>
Cc: Folkert van Heusden <folkert@vanheusden.com>,
	linux-kernel@vger.kernel.org
Subject: Re: optimalisation for strlcpy (lib/string.c)
Date: Mon, 11 Dec 2006 06:26:39 +0100	[thread overview]
Message-ID: <457CEC0F.2030206@anagramm.de> (raw)
In-Reply-To: <20061210231305.GG10351@stusta.de>

Hi, Adrian & Friends!

>> Like the other patch (by that other person), I think it is faster to not
>> do a strlen first.

There are PowerPC architectures, where a strlen is a matter of a single
instruction of the CPU.

Quote: "PowerPC 405 and 440 instruction sets offer the powerful
Determine Left-Most Zero Byte (DLMZB) instruction."

That's propably hard to beat.

So, if we really want to speed up these things, we should write
code which helps the compiler get that optimized instructions for
us - by improving the code of strlen() i.e.

Reference:
http://www-03.ibm.com/chips/power/powerpc/newsletter/sep2003/ppc_process_at_work2.html

Greets,

Clemens Koller
_______________________________
R&D Imaging Devices
Anagramm GmbH
Rupert-Mayer-Str. 45/1
81379 Muenchen
Germany

http://www.anagramm-technology.com
Phone: +49-89-741518-50
Fax: +49-89-741518-19


      reply	other threads:[~2006-12-11  5:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-10 21:23 optimalisation for strlcpy (lib/string.c) Folkert van Heusden
2006-12-10 21:49 ` Eyal Lebedinsky
2006-12-10 22:03   ` Folkert van Heusden
2006-12-10 21:55 ` Mitchell Blank Jr
2006-12-10 21:41   ` Folkert van Heusden
2006-12-10 23:13 ` Adrian Bunk
2006-12-11  5:26   ` Clemens Koller [this message]

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=457CEC0F.2030206@anagramm.de \
    --to=clemens.koller@anagramm.de \
    --cc=bunk@stusta.de \
    --cc=folkert@vanheusden.com \
    --cc=linux-kernel@vger.kernel.org \
    /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