[fpc-pascal] Fast CRC functions?

Mark Morgan Lloyd markMLl.fpc-pascal at telemetry.co.uk
Mon Aug 25 12:12:56 CEST 2014

Juha Manninen wrote:
> Ok, thanks. This is yet another topic I should learn about.
> Tony, I don't believe pycrc can generate much faster functions than
> ours unless it uses SIMD.
> Our function works well but it is called so ofter that its speed is relevant.
> Mark, I promise to study the algorithms but changing our algorith is
> not an option now. We want the same but faster.
> Maybe loop unrolling can make it little faster but nothing compared to
> a SIMD version of course.

My point was to take a look at the ones in the library, and see if one 
matches and if so whether it's faster (and then work out why). However 
I'm a bit dubious about your  and $00FFFFFF  operation which I suspect 
makes your implementation non-standard.

Loop unrolling may be an option, as might making sure that FPC is 
compiling the CRC generator with the best possible set of options. Using 
a thread probably isn't unless the buffers are large and you've got 
other useful work to do in parallel.

Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

More information about the fpc-pascal mailing list