Skip to content

Performance regression in findall on Bool array with predicate #42187

@KristofferC

Description

@KristofferC

Repro:

using BenchmarkTools
const y = rand(Bool, 1000)
@btime findall(x -> x > 1, y)

1.6:

julia> @btime findall(x -> x > 1, y)
  300.167 ns (1 allocation: 80 bytes)
Int64[]

1.7:

julia> @btime findall(x -> x > 1, y)
  702.505 ns (6 allocations: 4.50 KiB)
Int64[]

Also, note the increase in allocations

Metadata

Metadata

Assignees

No one assigned

    Labels

    performanceMust go fasterregressionRegression in behavior compared to a previous version

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions