Ran
|
Files
96
|
Run time
2s
|
Badge
Embed ▾
README BADGES
|
push
github
Improve performance of custom-iterator `__getitem__` (#1096) (#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 d4f28e35f) Co-authored-by: Jake Lishman <jake.lishman@ibm.com>
16746 of 17335 relevant lines covered (96.6%)
1240766.43 hits per line
Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
---|