Closed andreasnoack closed 7 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
Algorithmic complexity considerations are important for the
find
family of functions in general but for this function in particular. The complexity of the current implementationfindin
O(m + n) on average with a fairly large constant. The suggested alternative would have a complexity of O(m*n).