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

program.instructions is slow #1818

Open
2 tasks done
bramathon opened this issue Feb 3, 2025 · 0 comments
Open
2 tasks done

program.instructions is slow #1818

bramathon opened this issue Feb 3, 2025 · 0 comments
Labels
bug 🐛 An issue that needs fixing.

Comments

@bramathon
Copy link
Collaborator

Pre-Report Checklist

  • I am running the latest versions of pyQuil and the Forest SDK
  • I checked to make sure that this bug has not already been reported

Issue Description

Each time the .instructions property of a program is called, the entire instruction list must be converted from rust. This makes accessing instructions by index very slow.

return list(self.declarations.values()) + _convert_to_py_instructions(self._program.body_instructions)

@bramathon bramathon added the bug 🐛 An issue that needs fixing. label Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 An issue that needs fixing.
Projects
None yet
Development

No branches or pull requests

1 participant