You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Presumably, the implication of this is that searchsorted on a RangeStepRegular Range should be constant-time: just subtract the start, divide by the step, and round it (of course, handling all the edge-cases)? Is this something that could/should be implemented somewhere central? If so, I can't really work out how to write a method that dispatches specifically on Ranges that implement RangeStepRegular.
The text was updated successfully, but these errors were encountered:
The RangeStepStyle trait isn't used anywhere currently. It should probably have been removed when #26022 got rid of its uses in hashing code (at least the docstrings should be updated to stop mentioning hash). Maybe we could use it for searchsorted, but you could also start implementing functions for specific range types with a know regular step -- I'm not sure whether it's possible to write generic code which would work for any regular range.
RangeStepStyle is defined here:
https://github.com/JuliaLang/julia/blob/master/base/traits.jl#L55
Presumably, the implication of this is that
searchsorted
on a RangeStepRegular Range should be constant-time: just subtract the start, divide by the step, and round it (of course, handling all the edge-cases)? Is this something that could/should be implemented somewhere central? If so, I can't really work out how to write a method that dispatches specifically on Ranges that implementRangeStepRegular
.The text was updated successfully, but these errors were encountered: