-
Notifications
You must be signed in to change notification settings - Fork 125
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
New filter strategies #461
Conversation
@kornelski I'm not sure if the bitvec |
It's good to see all of these PRs coming from you lately. Thank you for your great work! ❤️
My two cents here: this may be a bit stupid and you probably have thought about it already, but have you considered using |
@AlexTMjugador Thanks for your comment! I tried a number of hashers, which generally weren't as good as I was expecting them to be.
Other ideas that weren't as fast:
Thought I just had:
Note oxipng is my first experience with rust, so any feedback on my code is welcome :) |
@shssoichiro I think it's good to merge |
Thanks, this looks amazing! I apologize for the slow response in getting it merged. That's completely on me. |
This PR adds 4 new heuristic filter strategies. These are all generally better than the standard number 5 strategy (MinSum) and can save even more when combined together.
Benchmarks on a set of test files with
-o4 -a -i0 -s
:*My machine has 8 threads, so using all 10 filters pushed me over my thread count.
Additional changes made in this PR:
filter_line
, which means this is included in all heuristic evaluations. This is how LodePNG does it with the entropy strategy, and I think it makes sense.Note that these filters are currently all opt-in. I will investigate including these in the default optimisation levels in future.
Closes #183