EmbeddedRelated.com
Forums

CRC calculation

Started by Jack March 22, 2017
On 23/03/17 09:26, Jack wrote:
> Il giorno mercoledì 22 marzo 2017 18:47:37 UTC+1, Tim Wescott ha scritto: > >> First, the speedup from doing it byte-by-byte will be enormous (I'm >> pretty sure it's more than a factor of 8 speedup on most processors, but >> I'm open to being told I'm nuts).
The speedup can often be more than a factor of 8 - you are not nuts. (Well, not in this case...)
> > doing it byte by byte (splitting the word in 2 bytes) with table there is a factor 6 speedup. > Could be better I think, but the compiler doesn't do a good job in optimizing things. >
If you need to speed it up more, then you'll have to post details of the chip, details of the compiler, compiler options, and of course the actual source code. I can't promise that anyone can make it faster, especially if it is an unusual processor, but it can be fun to try.
Il giorno giovedì 23 marzo 2017 10:09:17 UTC+1, David Brown ha scritto:
> On 23/03/17 09:26, Jack wrote: > > Il giorno mercoledì 22 marzo 2017 18:47:37 UTC+1, Tim Wescott ha scritto: > > > >> First, the speedup from doing it byte-by-byte will be enormous (I'm > >> pretty sure it's more than a factor of 8 speedup on most processors, but > >> I'm open to being told I'm nuts). > > The speedup can often be more than a factor of 8 - you are not nuts. > (Well, not in this case...) > > > > > doing it byte by byte (splitting the word in 2 bytes) with table there is a factor 6 speedup. > > Could be better I think, but the compiler doesn't do a good job in optimizing things. > > > > If you need to speed it up more, then you'll have to post details of the > chip, details of the compiler, compiler options, and of course the > actual source code. I can't promise that anyone can make it faster, > especially if it is an unusual processor, but it can be fun to try.
thanks for the offer, for the moment I'm happy with this. If the case, I'll ask again. Thanks Bye Jack