JuliaLang / Juleps

Julia Enhancement Proposals
Other
67 stars 24 forks source link

Remove bullet mentioning removal of findin #34

Closed andreasnoack closed 7 years ago

andreasnoack commented 7 years ago

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).

nalimilan commented 6 years ago

Coming to this again, it looks like the find(occursin(x), y) solution used at https://github.com/JuliaLang/julia/pull/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