Skip to content

Allocation regression when iterating over Adjoint of Matrix #971

Closed
JuliaLang/julia
#48120
@pablosanjose

Description

Ref: https://discourse.julialang.org/t/allocations-again/90780/13

António Araújo noted the following, which started happening sometime between v1.8.1 and v1.8.3

using BenchmarkTools

function test(x, Y)
    sum!(x, Y')
    return nothing
end

x = rand(Float64, 100)
Y = rand(Float64, 1, 100)
julia> @btime(test($x, $Y))
  301.619 ns (2 allocations: 96 bytes)

In v1.8.0 and v1.8.1 we have instead

julia> @btime(test($x, $Y))
  68.719 ns (0 allocations: 0 bytes)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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