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

Remove bullet mentioning removal of findin #34

Merged
merged 1 commit into from
May 18, 2017
Merged

Remove bullet mentioning removal of findin #34

merged 1 commit into from
May 18, 2017

Conversation

andreasnoack
Copy link
Member

Algorithmic complexity considerations are important for the find family
of functions in general but for this function in particular. The complexity
of the current implementation findin O(m + n) on average with a fairly
large constant. The suggested alternative would have a complexity of O(m*n).

Algorithmic complexity considerations are important for the find family
of functions in general but for this function in particular. The complexity
of the current implementation `findin` O(n) on average with a fairly
large constant. The suggested alternative would have a complexity of O(m*n).
@ararslan ararslan requested a review from nalimilan May 18, 2017 02:36
Copy link
Member

@nalimilan nalimilan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

@ararslan ararslan merged commit 2ba7b88 into master May 18, 2017
@ararslan ararslan deleted the anj/find branch May 18, 2017 16:31
@nalimilan
Copy link
Member

Coming to this again, it looks like the find(occursin(x), y) solution used at JuliaLang/julia#24673 could allow replacing findin with a specialized find(::OccursIn, ::Any) method, and still use the most efficient implementation under the hood (it will differ e.g. between arrays and strings).

Cc: @JeffBezanson

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