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

Avoid the call to permute in LookupInfo.lookup #33

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ccshan
Copy link
Contributor

@ccshan ccshan commented May 7, 2023

Call unsqueeze and permute ahead of time in LookupInfo.view, then just index into the result in view_lookup instead of lookup

This speeds up https://github.com/diprism/fggs/blob/main/test/test_sum_product.py by ~10%

ccshan added 2 commits May 7, 2023 00:32
Call `unsqueeze` and `permute` ahead of time in `LookupInfo.view`,
then just index into the result in `view_lookup` instead of `lookup`

This speeds up https://github.com/diprism/fggs/blob/main/test/test_sum_product.py by ~10%
@bdusell
Copy link
Owner

bdusell commented May 13, 2023

Thanks! I'll take a look and try to get this merged soon.

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