Skip to content

program.instructions is slow #1818

@bramathon

Description

@bramathon

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🐛An issue that needs fixing.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions