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

IndexedLDA/ADC/SBC optimization #611

Merged
merged 5 commits into from
Feb 13, 2021
Merged

IndexedLDA/ADC/SBC optimization #611

merged 5 commits into from
Feb 13, 2021

Conversation

WrathfulSpatula
Copy link
Collaborator

IndexedLDA() and variants are useful for Grover's search of a lookup table. Input tables are specified as byte pointers, composing words that are any multiple of 8 bits, (8, 16, 24, etc.). If the factors of 8 are powers of 2, then a static recasting of the input table pointer to native scalar pointer types avoids significant compositional costs.

@WrathfulSpatula
Copy link
Collaborator Author

See #612 for more details. I'm accepting my coverage, here, because "compositional" rather than "casting" branches in this PR are well-tested in their exact current forms. With existing unit tests, we end up covering the new "casting" branches in this PR. So, our coverage has both types of branch, with "compositional" tested for a long time past, but I'm lumping due coverage for this PR into #612 for this weekend.

@WrathfulSpatula
Copy link
Collaborator Author

I'm testing the 2-byte case, and this doesn't work, yet. WIP, for now.

@WrathfulSpatula WrathfulSpatula changed the title IndexedLDA/ADC/SBC optimization WIP: IndexedLDA/ADC/SBC optimization Feb 11, 2021
@WrathfulSpatula
Copy link
Collaborator Author

Actually, this did work. I just didn't scale the Grover's test correctly, to exceed an 8-bit maximum width of the value register. The unit tests have been updated to reflect the correct approach.

@WrathfulSpatula WrathfulSpatula changed the title WIP: IndexedLDA/ADC/SBC optimization IndexedLDA/ADC/SBC optimization Feb 12, 2021
@WrathfulSpatula
Copy link
Collaborator Author

Tested locally. Merging.

@WrathfulSpatula WrathfulSpatula merged commit e8bc6c4 into main Feb 13, 2021
@WrathfulSpatula WrathfulSpatula deleted the grover_optimize branch February 15, 2021 23:16
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.

1 participant