-
-
Notifications
You must be signed in to change notification settings - Fork 851
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 AVX2 version of adler32 #2024
Conversation
I kept meaning to migrate this across. https://github.com/SixLabors/ZlibStream/blob/main/src/ZlibStream/Adler32.cs Compression is currently broken in that repo (to a point I’m going to have to start again from the beginning of my fork and re-optimize with better tests) but Decompression works well and benchmarked faster at times than the runtime implementation. There’s some fast code in there. |
Ok, I was not aware of this. Will close this PR then. |
I’d still compare performance though. Your Adler might still be faster! |
The implementation from SixlaborsZlib is faster:
AdlerSsse3 is the SixLabors/ZlibStream version. After sleeping one night over it, I thought it might be still worth considering merging the AVX version of this PR to ImageSharp until we can make use of https://github.com/SixLabors/ZlibStream/blob/main/src/ZlibStream/Adler32.cs. I think it will take some time until we can make SixLabors/ZlibStream production ready. @JimBobSquarePants what do you think? |
I don’t know when I’ll get time to work exclusively on ZlibStream. It’s a minimum of a few weeks full time work to incrementally implement the optimisations again unless someone can spot the issue. So yeah, merge ahead if it’s easier to do so |
Ok then I think reopening this again makes sense. |
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.
LGTM 👍
ok lets wait for this to be merged when 2.0.1 is done. I think only hotfixes should go into 2.0.1 |
@JimBobSquarePants since we are skipping 2.0.1, this can now also get merged into the |
Yeah, merge away 👍 |
@JimBobSquarePants: The tests in this repo seem to pass and there are encode tests. How did you notice its not working as it should? |
Let me check my local copy and push failing tests. It’s definitely broken though and the tests are not adequate. Not related to adler though! |
Prerequisites
Description
This PR adds a AVX2 version of adler method.
Benchmark results: