Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add efficient findfirst methods for UnitRange #35256

Merged
merged 1 commit into from
Mar 27, 2020

Conversation

mcabbott
Copy link
Contributor

This is like #30778 but for unit ranges. Before & after:

@btime findfirst(isequal(500), Base.OneTo(1_000))  # 285.704 ns 
@btime _findfirst(isequal(500), Base.OneTo(1_000)) # 0.029 ns

@btime findfirst(isequal(500), -10^6:10^6)     # 1.114 ms
@btime _findfirst(isequal(500), $(-10^6:10^6)) # 0.029 ns

@dkarrasch dkarrasch merged commit 3534bc1 into JuliaLang:master Mar 27, 2020
@mcabbott mcabbott deleted the findfirst branch March 27, 2020 18:25
oxinabox pushed a commit to oxinabox/julia that referenced this pull request Apr 8, 2020
Co-authored-by: Michael Abbott <me@escbook>
ravibitsgoa pushed a commit to ravibitsgoa/julia that referenced this pull request Apr 9, 2020
Co-authored-by: Michael Abbott <me@escbook>
KristofferC pushed a commit that referenced this pull request Apr 11, 2020
Co-authored-by: Michael Abbott <me@escbook>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants