-
Notifications
You must be signed in to change notification settings - Fork 311
Optimize crc64_rocksoft for aarch64 #327
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @tipabu. What do you mean with this phrase? "I'm not how worried to be about them." It looks like this needs some rewording, thanks.
e21f296
to
b417007
Compare
Fixed up -- sorry about that! Was just missing a "sure":
|
FWIW, running locally (M4 MacBook Air) with master I see results like
vs
with this. Also did some extra equivalency testing against the base implementation with https://paste.opendev.org/show/bG3ZmKo1m1D2MZqb7B8Q/ |
Thanks @tipabu. Could you also update Release notes with this change? |
Should it go under
|
Is someone going to add the rock soft polynomial to the X86 code base? |
It's already there and optimized (see |
Somehow I missed that. Is there a program to generate the rk constants used in the .asm files. similar to what I did when I ported an older version to build with Visual Studio, such as crc64fg.cpp or crc64rg.cpp ? |
Under 3. CHANGE LOG..., in the v2.32 section. Thanks! |
Don't forget to rebase :) |
This makes it easier to compare the constants used for crc/crc64_*_by8.asm, crc/crc64_*_by16_10.asm, and crc/aarch64/crc64_*_pmull.h Note that this revealed some unexpected (to me) discrepancies: ecma_refl: br_high != rk8 (92d8af2baf0e1e85 vs 92d8af2baf0e1e84) iso_refl: br_high != rk8 (b000000000000001 vs b000000000000000) jones_refl: br_high != rk8 (2b5926535897936b vs 2b5926535897936a) I'm not sure how worried to be about them. Signed-off-by: Tim Burke <[email protected]>
Closes intel#326 Signed-off-by: Tim Burke <[email protected]>
@jeffareid Your same programs work; just need to @pablodelara Done. |
That difference of 1 only occurs with refl CRC, and there is no advantage to not have the right most bit of rk8 set to 1. For reflected CRC, rk8 = the right most 64 bits of a 65 bit reversed polynomial. The missing 65th bit represents x^0, while the right most bit in rk8 represents x^64. Since the CRC is 64 bits, that right most x^64 bit can be ignored (set to 0), but there is no advantage to not having it set to 1. If interested, I can explain this in more detail. |
Thanks for the detailed explanation, @jeffareid! I think it finally clicked for me with
|
If fully implemented, then the bits for x^64 to x^127 will all end up equal to zero, but that calculation is not needed since the returned CRC is only for x^0 to x^63. Still there's no advantage of leaving out the x^64 bit in rk8, so I don't know why that was done. |
Closes #326