public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@suse.cz>
To: Steve Grubb <ddata@gate.net>, linux-kernel@vger.kernel.org
Subject: Re: [Patch] performance enhancement for simple_strtoul
Date: Thu, 21 Dec 2000 21:05:27 +0100	[thread overview]
Message-ID: <20001221210527.B1545@bug.ucw.cz> (raw)
In-Reply-To: <000e01c06a8e$6945db60$bc1a24cf@master>
In-Reply-To: <000e01c06a8e$6945db60$bc1a24cf@master>; from Steve Grubb on Wed, Dec 20, 2000 at 09:09:03AM -0500

Hi!

> The following patch is a faster implementation of the simple_strtoul
> function. This function differs from the original in that it reduces the
> multiplies to shifts and logical operations wherever possible. My testing
> shows that it adds around 100 bytes, but is about 6% faster on a K6-2. (It
> is 40% faster that glibc's strtoul, but that's a different story.) My guess
> is that the performance gain will be higher on platforms with slower
> multiplication instructions. I have tested it for numerical accuracy so I
> think this is safe to apply. If anyone is interested, I can also supply a
> test application that demonstrates the performance gain. This patch was
> generated against 2.2.16, but should apply to 2.2.19 cleanly. In
> 2.4.0-test9, simple_strtoul starts on line 19 rather than 17, hopefully
> that's not a problem.

Simple question: who cares about performance of simple_strtoul?

Original is shorter, and simple_strtoul is not performace
critical. Keep it as it is.

-- 
I'm pavel@ucw.cz. "In my country we have almost anarchy and I don't care."
Panos Katsaloulis describing me w.r.t. patents at discuss@linmodems.org
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

      parent reply	other threads:[~2000-12-22 10:29 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-12-20 14:09 [Patch] performance enhancement for simple_strtoul Steve Grubb
2000-12-20 16:04 ` Jeff Epler
2000-12-20 16:35   ` Steve Grubb
2000-12-20 18:42   ` Steve Grubb
2000-12-21  0:09     ` Jamie Lokier
2000-12-21 20:06       ` Pavel Machek
2000-12-28  5:15         ` Jamie Lokier
2000-12-21  9:16 ` Matthias Andree
2000-12-21 10:28   ` Bernd Schmidt
2000-12-21 16:07   ` Alan Cox
2000-12-21 20:05 ` Pavel Machek [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=20001221210527.B1545@bug.ucw.cz \
    --to=pavel@suse.cz \
    --cc=ddata@gate.net \
    --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