public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Nathan Sidwell <nathan@acm.org>
To: Richard Biener <richard.guenther@gmail.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] Do CRC 4 bits at a time
Date: Wed, 26 Apr 2017 14:25:00 -0000	[thread overview]
Message-ID: <6a22ed60-d038-358e-85f5-bbec55c590e3@acm.org> (raw)
In-Reply-To: <CAFiYyc3SXXXdLj=djiQwynpE6-zm9cdPeTQpWJTsb8CS0J2Xnw@mail.gmail.com>

On 04/26/2017 04:52 AM, Richard Biener wrote:
> On Tue, Apr 25, 2017 at 6:47 PM, Nathan Sidwell <nathan@acm.org> wrote:

> Please use 'inline' rather than 'static inline'.

Oh, ok (must have been misled by some exiting static inline somewhere)
> 
> Did you test the patch produces the same CRCs than before?  Did you do
> any performance measurements?

Yes.
1) applied both to a random incoming checksum and random value.  A 
billion iterations showed no differences.

2) 100 million iterations show the new version slightly more than twice 
as fast.

> Otherwise looks ok to me.  I wonder why we have this "copy" at all rather
> than using libiberties xcrc32?

Hm, not entirely sure, I originally introduced crc32_string back in 
2003, which could have used libiberty's (unless perhaps at that time 
things were out of sync, so we didn't have it there?)  For some reason I 
chose not to.

But now, we commonly get the CRC of individual byte values or unsigneds, 
which the xcrc32 interface doesn't do well.  David Li broke it apart to 
make that useful in 2011.

ok with the static inline fix?

nathan

-- 
Nathan Sidwell

  reply	other threads:[~2017-04-26 14:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-25 16:54 Nathan Sidwell
2017-04-26  9:14 ` Richard Biener
2017-04-26 14:25   ` Nathan Sidwell [this message]
2017-04-26 14:33     ` Richard Biener

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=6a22ed60-d038-358e-85f5-bbec55c590e3@acm.org \
    --to=nathan@acm.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=richard.guenther@gmail.com \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).