Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move QPY version regex construction to import time
As pointed out by @nkanazawa1989 in Qiskit#8232 the regex construction added to the QPY interface functions in Qiskit#8200 can be a significant portion of the overall function time especially for smaller inputs. Especially as we're building it on every call interface function call. To ameliorate that cost this commit compiles the version regex a single time at the module level. This adds the overhead to import but it will only be done once which should be a net improvement in performance.
- Loading branch information