-
Notifications
You must be signed in to change notification settings - Fork 16
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
add pclmulqdq
crc32 variant
#31
Conversation
it matches crc32fast performance, but at a much bigger code size
95a9af7
to
4759a39
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #31 +/- ##
==========================================
+ Coverage 85.99% 86.16% +0.16%
==========================================
Files 29 31 +2
Lines 6591 6982 +391
==========================================
+ Hits 5668 6016 +348
- Misses 923 966 +43 ☔ View full report in Codecov by Sentry. |
@@ -183,3 +183,13 @@ pub fn compress_slice<'a>( | |||
|
|||
(&mut output[..stream.total_out], libz_ng_sys::Z_OK) | |||
} | |||
|
|||
pub unsafe fn crc32(start: u32, buf: *const u8, len: usize) -> u32 { | |||
let lib = libloading::Library::new("/home/folkertdev/c/libcrc.so").unwrap(); |
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.
Maybe add this to the repo?
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.
will do in a separate PR
We've had some discussion about whether we really need to have our own implementation of crc32. It turns out that we get a massive speed boost over
crc32fast
in the streaming case (when input comes in in small chunks):when all the input is availabe, the current implementation is just as fast as
crc32fast
.