Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
…iskit#1100) Flipping the order of `Slice` and `Int` in `SliceOrInt` so that `Int` comes first means that the `FromPyObject` derivation will then try `Int` first, which is the correct variant in like 99.9% of uses of the struct. This has the impact of improving int `__getitem__` times in the custom iterators by about 3x (from 205ns to 61ns on my machine), which has knock-on effects for the implicit iterators Python defines for these classes. (cherry picked from commit d4f28e3) Co-authored-by: Jake Lishman <jake.lishman@ibm.com>
- Loading branch information