|
Boost : |
From: Vladimir Prus (ghost_at_[hidden])
Date: 2001-03-13 09:51:03
Daryle Walker wrote:
>I just posted a new version (5) of "crc.zip" that reverses the computation
>parameters instead of the byte.
>....
>I wonder what this version speed will be.
For your system, you can find the speed by compiling/running attached
program. For bcc, new code is 2.5-3 times slower than version I use for
comparison. I think there's only one optimization to be made. You call
crc_lookup inside checksumming loop, and that is slow. It is easy to change by
- making a routine get_crc_table which instread of table entry will return
table itself
- adding member "table" to crc_fast
- assigning that member from call to get_crc_table in ctor.
After that change is made, code works within 25% of reference implementation'
speed and much closer most of the time.
-- Regards, Vladimir
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk