This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Do CRC 4 bits at a time
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Nathan Sidwell <nathan at acm dot org>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 26 Apr 2017 16:25:55 +0200
- Subject: Re: [PATCH] Do CRC 4 bits at a time
- Authentication-results: sourceware.org; auth=none
- References: <78941ada-34a7-432f-f991-a0002a615797@acm.org> <CAFiYyc3SXXXdLj=djiQwynpE6-zm9cdPeTQpWJTsb8CS0J2Xnw@mail.gmail.com> <6a22ed60-d038-358e-85f5-bbec55c590e3@acm.org>
On Wed, Apr 26, 2017 at 4:04 PM, Nathan Sidwell <nathan@acm.org> wrote:
> 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.
I see.
> ok with the static inline fix?
Ok.
Thanks,
Richard.
> nathan
>
> --
> Nathan Sidwell