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
Use target slot analysis to simplify insert-rotate
#530
Conversation
Ohhh, nice! That's a cool little insight, independent of the main point of the PR/pass. We might want to start collecting these things and other "best practices"/"tips and tricks" somewhere so new contributors can discover them? |
ccffc3d
to
2cbc854
Compare
Rebased and ready for any final review comments. |
2cbc854
to
48ca56d
Compare
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.
Looks good to me! Sorry for the delay, I thought I had reviewed this on Friday before leaving for Toronto, but apparently forgot 🙈
48ca56d
to
eddb716
Compare
Rebased off #526
This gives us a cleaner implementation of the target slot selection, and has a few benefits:
hamming_distance
and thesimple_sum
from Achieve the optimum rotations for insert-rotate on a simple_sum example #520 materialize their reductions as a sequence of shift-by-1 rotates, which means we can augmentrotate-and-reduce
to support replacing that with a logarithmic number of rotations. In particular, this increased the number of rotations of the hamming_distance test case by one, which is temporary.