Skip to content
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

Replace software implementation of castagnoli crc32 with hardware implementation #32

Merged
merged 1 commit into from
Sep 16, 2023

Conversation

rukai
Copy link
Collaborator

@rukai rukai commented Sep 6, 2023

We found that castagnoli crc was a bottleneck in our application, this PR swaps our castagnoli crc implementation to a hardware implementation which should improve performance significantly when the hardware is available.

I made this PR upstream to add a comparison between crc32c and crc crates but here are the results on my machine which has the required 4.2 SSE available:
image

crc32c vastly outperforms crc, it is getting throughputs of ~6GiB/s while crc is getting throughputs of ~500MiB/s

@rukai rukai marked this pull request as ready for review September 7, 2023 03:22
@tychedelia tychedelia self-requested a review September 8, 2023 16:02
@tychedelia
Copy link
Owner

Hi @rukai sorry for being MIA, have been in the process of moving cross country. Will review this shortly!

@rukai
Copy link
Collaborator Author

rukai commented Sep 8, 2023

No worries, hope your move goes well!

Copy link
Owner

@tychedelia tychedelia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks.

@tychedelia tychedelia merged commit 974738a into tychedelia:main Sep 16, 2023
@tychedelia
Copy link
Owner

Just released https://crates.io/crates/kafka-protocol/0.7.0 including this.

@rukai
Copy link
Collaborator Author

rukai commented Sep 16, 2023

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants