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

Missing specialized findnext/findprev methods for BitArray #30177

Open
nalimilan opened this issue Nov 28, 2018 · 0 comments
Open

Missing specialized findnext/findprev methods for BitArray #30177

nalimilan opened this issue Nov 28, 2018 · 0 comments
Labels
arrays [a, r, r, a, y, s] performance Must go faster search & find The find* family of functions

Comments

@nalimilan
Copy link
Member

We currently provide optimized methods for findnext/prev(testf::Function, B::BitArray, start::Integer), but not for findnext/prev(testf::Function, B::BitArray, start::CartesianIndex). There are two problems:

  • The lack of optimized BitArray methods for CartesianIndex means that the slow AbstractArray fallback is used, in particular by findfirst and findlast.
  • The methods for Integer are inconsistent with Array/AbstractArray, for which we don't support passing a linear index (except for vectors). That's not a big deal since these additional BitArray methods don't conflict with the AbstractArray ones (and it would make sense to add them for AbstractArray for when you want a linear index result).

See also #30102.

@nalimilan nalimilan added performance Must go faster search & find The find* family of functions labels Nov 28, 2018
@nsajko nsajko added the arrays [a, r, r, a, y, s] label Oct 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arrays [a, r, r, a, y, s] performance Must go faster search & find The find* family of functions
Projects
None yet
Development

No branches or pull requests

2 participants