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

CRC32/MD5 optimisations #177

Merged
merged 4 commits into from
May 31, 2023
Merged

Conversation

animetosho
Copy link
Contributor

I noticed that a few simple things could be done to improve hashing performance:

  • CRC32 zero extension can be computed using GF arithmetic instead of passing 0s through. Doing so greatly speeds up the window table generation
  • the CRC window mask can be incorporated into the window table itself, saving the mask operation. Speed difference is likely negligible, but it simplifies code
  • avoid unnecessarily copying blocks in MD5 on little endian CPUs
  • slightly faster MD5 round expressions

(I don't really see par2cmdline being highly performance focused, but these are relatively simple tweaks which I thought would make sense to have)

@BlackIkeEagle BlackIkeEagle merged commit 277cda9 into Parchive:master May 31, 2023
@animetosho animetosho deleted the optimise_hashing branch May 31, 2023 22:04
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