julia
c9156d4f - Implement specialized `_findin` when second arg is `AbstractSet` (#48891)

Commit
296 days ago
Implement specialized `_findin` when second arg is `AbstractSet` (#48891) Prior to this PR, `_findin` converts its second argument to a `Set` before using it. However, this overhead is unnecessary if the argument is already an `AbstractSet`. `_findin` is in turn called by `findall`, so this change provides a fast path for `findall(in(s), ...)`, where `s` is an `AbstractSet`: ```julia julia> s = Set([1,2,3,4]) Set{Int64} with 4 elements: 4 2 3 1 julia> findall(in(s), [1,3,5,7,5,3,1]) 4-element Vector{Int64}: 1 2 6 7 ```
Author
Parents
Loading