From: Wolfgang Denk <wd@denx.de>
To: Marc Singer <elf@buici.com>
Cc: Joakim Tjernlund <Joakim.Tjernlund@lumentis.se>,
linux-mtd@lists.infradead.org
Subject: Re: crc32() optimization
Date: Sun, 10 Nov 2002 20:25:38 +0100 [thread overview]
Message-ID: <20021110192544.0A34D10162@denx.denx.de> (raw)
In-Reply-To: Your message of "Sun, 10 Nov 2002 10:43:21 PST." <20021110184321.GB16087@buici.com>
In message <20021110184321.GB16087@buici.com> you wrote:
> As it should. I wonder if you'd do better changing the loop slightly.
>
> Check for len == 0 and do a short-circuit return. Then do this
>
> for (++len; len & 0x7; len >>= 3) {
> ONCE(); // repeat eight times
> ...
> len >>= 3;
> }
> while (--len > 0)
> ONCE();
>
> This is the implementation I've written for another project which
Seems broken to me, since you "len >>= 3" twice.
Also, Duff's Device comes to mind.
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd@denx.de
See us @ electronica 2002 in Munich, Nov 12-15, Hall A3, Booth A3.325
next prev parent reply other threads:[~2002-11-10 18:55 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <F122OgRGkQ6mBySsxVY00000854@hotmail.com>
[not found] ` <24987.1036797874@passion.cambridge.redhat.com>
2002-11-10 15:28 ` crc32() optimization Joakim Tjernlund
2002-11-10 18:43 ` Marc Singer
2002-11-10 19:25 ` Wolfgang Denk [this message]
2002-11-10 20:05 ` Joakim Tjernlund
2002-11-10 21:00 ` Wolfgang Denk
2002-11-10 21:22 ` Joakim Tjernlund
2002-11-10 22:35 ` Joakim Tjernlund
2002-11-10 22:41 ` Wolfgang Denk
2002-11-10 23:00 ` Joakim Tjernlund
2002-11-10 23:56 ` Eric W. Biederman
2002-11-11 1:31 ` Marc Singer
2002-11-11 1:37 ` Wolfgang Denk
2002-11-11 4:42 ` Marc Singer
2002-11-25 15:55 ` Herman Oosthuysen
2002-11-25 16:12 ` Joakim Tjernlund
2002-11-11 0:50 ` Marc Singer
2002-11-10 20:04 ` Joakim Tjernlund
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=20021110192544.0A34D10162@denx.denx.de \
--to=wd@denx.de \
--cc=Joakim.Tjernlund@lumentis.se \
--cc=elf@buici.com \
--cc=linux-mtd@lists.infradead.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